Switched from JSCS to ESLint
This patch switches horizon from using JSCS to using ESlint. It
adds the john papa style guides as an eslint plugin, and deactivates
additional linting rules so current cleanup efforts can focus on the
issues remaining from JSCS. Once that cleanup effort is complete,
we can switch our linting job to voting and move forward from there.
YAML for .eslintrc was chosen because the JSON specification does
not allow comments, and having comments (including rule links) will
make it easier to discuss linting changes.
Deactivated eslint rules have each been annotated with a # TODO
statement, so we can address them in the future. Links in the
documentation have been updated to new contributor guidelines, which
will be updated after this patch lands.
Linting may be executed by first installing npm dependencies using
`npm install`, and then executing `npm run lint` at any time in the
future. No python venv is required.
For clarification: We are switching to ESLint because JSCS explicitly
focuses on code-style, not on language use errors. For that purpose,
JSCS explicitly defers to JSHint, which due to the 'do no evil' license is
not usable. Since ESLint provides both the codestyle functionality, and
the language use checks, of both JSCS and JSHint, it was deemed the
only viable tool,
http://lists.openstack.org/pipermail/openstack-dev/2015-June/067030.html
Change-Id: Ib4c3f77f8cc3cdaa3c7558b7bc3a6d1299b6dcbe
Partially-Implements: blueprint jscs-cleanup
2015-06-16 10:27:59 -07:00
|
|
|
# Set up globals
|
|
|
|
globals:
|
|
|
|
angular: false
|
|
|
|
|
2015-07-15 13:36:55 -07:00
|
|
|
extends: openstack
|
|
|
|
|
Switched from JSCS to ESLint
This patch switches horizon from using JSCS to using ESlint. It
adds the john papa style guides as an eslint plugin, and deactivates
additional linting rules so current cleanup efforts can focus on the
issues remaining from JSCS. Once that cleanup effort is complete,
we can switch our linting job to voting and move forward from there.
YAML for .eslintrc was chosen because the JSON specification does
not allow comments, and having comments (including rule links) will
make it easier to discuss linting changes.
Deactivated eslint rules have each been annotated with a # TODO
statement, so we can address them in the future. Links in the
documentation have been updated to new contributor guidelines, which
will be updated after this patch lands.
Linting may be executed by first installing npm dependencies using
`npm install`, and then executing `npm run lint` at any time in the
future. No python venv is required.
For clarification: We are switching to ESLint because JSCS explicitly
focuses on code-style, not on language use errors. For that purpose,
JSCS explicitly defers to JSHint, which due to the 'do no evil' license is
not usable. Since ESLint provides both the codestyle functionality, and
the language use checks, of both JSCS and JSHint, it was deemed the
only viable tool,
http://lists.openstack.org/pipermail/openstack-dev/2015-June/067030.html
Change-Id: Ib4c3f77f8cc3cdaa3c7558b7bc3a6d1299b6dcbe
Partially-Implements: blueprint jscs-cleanup
2015-06-16 10:27:59 -07:00
|
|
|
# Most environment options are not explicitly enabled or disabled, only
|
|
|
|
# included here for completeness' sake. They are commented out, because the
|
|
|
|
# global updates.py script would otherwise override them during a global
|
|
|
|
# requirements synchronization.
|
|
|
|
#
|
|
|
|
# Individual projects should choose which platforms they deploy to.
|
|
|
|
|
|
|
|
env:
|
|
|
|
# browser global variables.
|
|
|
|
browser: true
|
|
|
|
|
|
|
|
# Adds all of the Jasmine testing global variables for version 1.3 and 2.0.
|
|
|
|
jasmine: true
|
|
|
|
|
|
|
|
|
2015-07-15 13:36:55 -07:00
|
|
|
# Below we adjust rules specific to horizon's usage of openstack's linting
|
|
|
|
# rules, and its own plugin inclusions.
|
Switched from JSCS to ESLint
This patch switches horizon from using JSCS to using ESlint. It
adds the john papa style guides as an eslint plugin, and deactivates
additional linting rules so current cleanup efforts can focus on the
issues remaining from JSCS. Once that cleanup effort is complete,
we can switch our linting job to voting and move forward from there.
YAML for .eslintrc was chosen because the JSON specification does
not allow comments, and having comments (including rule links) will
make it easier to discuss linting changes.
Deactivated eslint rules have each been annotated with a # TODO
statement, so we can address them in the future. Links in the
documentation have been updated to new contributor guidelines, which
will be updated after this patch lands.
Linting may be executed by first installing npm dependencies using
`npm install`, and then executing `npm run lint` at any time in the
future. No python venv is required.
For clarification: We are switching to ESLint because JSCS explicitly
focuses on code-style, not on language use errors. For that purpose,
JSCS explicitly defers to JSHint, which due to the 'do no evil' license is
not usable. Since ESLint provides both the codestyle functionality, and
the language use checks, of both JSCS and JSHint, it was deemed the
only viable tool,
http://lists.openstack.org/pipermail/openstack-dev/2015-June/067030.html
Change-Id: Ib4c3f77f8cc3cdaa3c7558b7bc3a6d1299b6dcbe
Partially-Implements: blueprint jscs-cleanup
2015-06-16 10:27:59 -07:00
|
|
|
rules:
|
2015-11-12 14:35:48 -08:00
|
|
|
#############################################################################
|
|
|
|
# Disabled Rules from eslint-config-openstack
|
|
|
|
#############################################################################
|
2016-03-08 10:36:52 -07:00
|
|
|
valid-jsdoc: [1, {
|
|
|
|
requireParamDescription: false
|
|
|
|
}]
|
2015-11-12 14:35:48 -08:00
|
|
|
no-undefined: 1
|
|
|
|
brace-style: 1
|
|
|
|
no-extra-parens: 1
|
|
|
|
callback-return: 1
|
|
|
|
block-scoped-var: 1
|
2016-05-18 15:02:55 -06:00
|
|
|
quote-props: 0
|
2016-02-24 05:20:46 -08:00
|
|
|
space-in-parens: 1
|
|
|
|
no-use-before-define: 1
|
|
|
|
no-unneeded-ternary: 1
|
Switched from JSCS to ESLint
This patch switches horizon from using JSCS to using ESlint. It
adds the john papa style guides as an eslint plugin, and deactivates
additional linting rules so current cleanup efforts can focus on the
issues remaining from JSCS. Once that cleanup effort is complete,
we can switch our linting job to voting and move forward from there.
YAML for .eslintrc was chosen because the JSON specification does
not allow comments, and having comments (including rule links) will
make it easier to discuss linting changes.
Deactivated eslint rules have each been annotated with a # TODO
statement, so we can address them in the future. Links in the
documentation have been updated to new contributor guidelines, which
will be updated after this patch lands.
Linting may be executed by first installing npm dependencies using
`npm install`, and then executing `npm run lint` at any time in the
future. No python venv is required.
For clarification: We are switching to ESLint because JSCS explicitly
focuses on code-style, not on language use errors. For that purpose,
JSCS explicitly defers to JSHint, which due to the 'do no evil' license is
not usable. Since ESLint provides both the codestyle functionality, and
the language use checks, of both JSCS and JSHint, it was deemed the
only viable tool,
http://lists.openstack.org/pipermail/openstack-dev/2015-June/067030.html
Change-Id: Ib4c3f77f8cc3cdaa3c7558b7bc3a6d1299b6dcbe
Partially-Implements: blueprint jscs-cleanup
2015-06-16 10:27:59 -07:00
|
|
|
|
2015-07-09 16:39:25 -06:00
|
|
|
#############################################################################
|
|
|
|
# Angular Plugin Customization
|
|
|
|
#############################################################################
|
|
|
|
|
2015-12-17 16:31:15 -08:00
|
|
|
angular/controller-as-vm:
|
2015-07-09 16:39:25 -06:00
|
|
|
- 1
|
|
|
|
- "ctrl"
|
2015-08-17 11:43:33 -07:00
|
|
|
|
|
|
|
# Remove after migrating to angular 1.4 or later.
|
2015-12-17 16:31:15 -08:00
|
|
|
angular/no-cookiestore:
|
2015-11-12 14:35:48 -08:00
|
|
|
- 1
|