summaryrefslogtreecommitdiff
path: root/.eslintrc
Commit message (Collapse)AuthorAgeFilesLines
* Update ESLint devDependencies in package.jsonTatiana Ovchinnikova2020-12-161-0/+2
| | | | | | | | | This patch updates outdated JavaScript dev dependencies. The latest ESLint version adds rules changes. Some rules are disabled to prevent checks failures, some minor issues are fixed. Change-Id: I01c5ccb5c8f7ceb827a3978157b4d76805d259c1
* Disabling warnings of 'quote-props'Matt Borland2016-05-181-1/+1
| | | | | | | Disables warnings of type 'quote-props' as discussed in a recent IRC meeting. Change-Id: I36fd59dc639f93997bd9401e622f8ddfc662145e Closes-Bug: 1583346
* Upgraded eslint-config-openstack to 1.2.4Michael Krotscheck2016-04-131-0/+4
| | | | | | | | | | | | This patch upgrades eslint to version 1.2.4, incorporating new rule changes on no-undefined, brace-style, quote-props, space-in-parens, no-use-before-define, no-uneeded-ternary, and quote. For now, rules that have been activated that cause checks to fail have been switched to warning-only. Additionally, rules that have been entirely disabled have been removed. Change-Id: Ifba7a19da669288cb19cfc8055bdfa7b94f00292
* Cleaning code to remove eslint warnings from Launch InstanceMatt Borland2016-03-181-1/+3
| | | | | | | Cleans up eslint warnings. Change-Id: I920f434c008c4679ce5758c70031d1ec5d26a2b7 Partial-Bug: 1554824
* Merge "Enable "no-new" and "guard-for-in""Jenkins2016-01-311-2/+0
|\
| * Enable "no-new" and "guard-for-in"Michael Krotscheck2015-12-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | This patch enables both the "no-new" and the "guard-for-in" rules from upstream eslint-config-openstack. There were no detected violations for the former, and the latter is only set to "warn" in eslint-config-openstack. http://eslint.org/docs/rules/no-new http://eslint.org/docs/rules/guard-for-in Change-Id: Iac9eaba6ac3532795ce26e55d1304ba3c67ccff2
* | Merge "Enable no-redeclare"Jenkins2016-01-301-1/+0
|\ \ | |/
| * Enable no-redeclareMichael Krotscheck2015-12-231-1/+0
| | | | | | | | | | | | | | This enables the no-redeclare linting rule from eslint-config-openstack, and corrects any errors found. Change-Id: I2835b3ee9e20b735901315aa19919eb810cf5b75
* | Merge "Enable semi-spacing"Jenkins2016-01-281-1/+0
|\ \ | |/
| * Enable semi-spacingMichael Krotscheck2015-12-231-1/+0
| | | | | | | | | | | | | | | | | | This patch enables the "semi-spacing" rule from eslint-config-openstack, and corrects any errors found. http://eslint.org/docs/rules/semi-spacing Change-Id: Ib6a2d856f24b53b24c65c4165cec92a7c1428832
* | Merge "Enable consistent-return"Jenkins2016-01-271-1/+0
|\ \ | |/
| * Enable consistent-returnMichael Krotscheck2015-12-231-1/+0
| | | | | | | | | | | | | | | | | | This rule enables the "consistent-return" eslint rule from eslint-config-openstack, and corrects any linting errors found. http://eslint.org/docs/rules/consistent-return Change-Id: Icf048ff81d3a1339a27a15c42822c293d335d259
* | Update eslint-plugin-angular to the latestRajat Vig2016-01-111-2/+2
|/ | | | | | | | | | eslint-plugin-angular in use by the project is quite old and the new library has changed rules. This patch updates the library and fixes the code where rule names have changed. Change-Id: I2e60a07b899325f17f38b96d40325602b4b58219 Closes-Bug: #1527417
* Enable strictMichael Krotscheck2015-12-041-1/+0
| | | | | | | | | This rule enables the "strict" eslint rule from eslint-config-openstack, and corrects any linting errors found. http://eslint.org/docs/rules/strict Change-Id: Id7d5a6ec89e664dbf391fc0e2a2e8491057ab2be
* Enable eqeqeqMichael Krotscheck2015-11-251-1/+0
| | | | | | | | | This enables the eqeqeq linting rule from eslint-config-openstack, and corrects any errors found. http://eslint.org/docs/rules/eqeqeq Change-Id: Iad857ae3f9963c7cb93c494d351c3908d87cd4a0
* Enable radixMichael Krotscheck2015-11-181-1/+0
| | | | | | | This enables the radix linting rule from eslint-config-openstack, and corrects any found errors. Change-Id: Icfb8dd7a91770a84f94468693609093aedd31337
* Enable no-unused-varsMichael Krotscheck2015-11-181-1/+0
| | | | | | | This enables the no-unused-vars rule from the upstream eslint-config-openstack, and corrects all linting errors found. Change-Id: I9f5fb29cd9b2429698819ecf556ced933378b081
* Enable no-multi-spacesMichael Krotscheck2015-11-161-1/+0
| | | | | | | Enable the no-multi-spaces rule, and correct linting errors where found. Change-Id: Ia7ed2a35d69b455e92849df2ccde9d9cf8e7a104
* Upgraded eslint-config-openstack to 1.2.3Michael Krotscheck2015-11-161-1/+20
| | | | | | | This updates eslint-config-openstack to 1.2.3, and downgrades the new rules so we can tackle them one at a time. Change-Id: I3d7a20a6141a8748a60ceefcd33a1310456302dd
* Upgraded eslint rule libraries.Michael Krotscheck2015-10-161-0/+4
| | | | | | | | | | | | | | | | | The newer version of eslint comes with somewhat stricter rules about indentation and whitespace, so some files have been adjusted to accomodate. The newer version of eslint-config-openstack includes a relaxed version requirement for eslint, as well as a switch/case indentation update. The newer version of the angular eslint rules includes a deprecation rule for $cookieStorage, which has been set to warning. Change-Id: Id201a42e3ab484222f938a541507df2e96da2dcf Partially-Implements: blueprint jscs-cleanup
* Use eslint-config-openstackMichael Krotscheck2015-07-151-809/+4
| | | | | | | | | | | | | | | Instead of explicitly copying all the linting rules between projects, openstack now publishes a set of rules (much like hacking) that can be included in projects that want to adhere by our standards. This patch switches horizon to use this set of rules. Note: The rules in eslint-config-openstack are a verbatim copy of what's currently in use in Horizon. Future versions will likely start activating rules flagged as "TODO", however you can avoid build instability by avoiding the use of fuzzy version matching in package.json (which this patch does). Change-Id: Ib93e0def096999ece7f636d028e3b1ecd4a4facc
* Revert "Ignore the ng_on_watch error from eslint"Michael Krotscheck2015-07-131-4/+0
| | | | | | | | | | | | | | | This reverts commit 9b210766508bfeab6cb7f1c4d0c1524a51209613. The original commit was merged with a -1. The concern raised was that it does not force engineers to clean up after themselves, which is a best practice explicitly mentioned in the John Papa style guides under Y070. While this rule is only specific to directives, it's common sense, and the directive to "clean up your pointers" goes back as far as C. https://github.com/johnpapa/angular-styleguide#style-y070 Change-Id: Iea243c2b0b3c6154c5b02fd9e29172e1d5e3b434
* Merge "Add selective ESLint rule activation for Horizon Legacy JS"Jenkins2015-07-111-5/+1
|\
| * Add selective ESLint rule activation for Horizon Legacy JSMichael Krotscheck2015-07-081-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the files for eslint overrides in the two different segments of horizon's codebase: Legacy and Dashboard. There are quite a few rules that had to be deactivated, which will reduce the effectiveness of legacy linting. Note: You cannot disable plugins in .eslintrc files, you can only enable them. This is why there appear to be two redundant .eslintrc files that enable the angular rules. Change-Id: I5768cbc43e788a4320a6bb637c263dc3c3df3db9 Partially-Implements: blueprint jscs-cleanup
* | Merge "Ignore the ng_on_watch error from eslint"Jenkins2015-07-101-0/+4
|\ \
| * | Ignore the ng_on_watch error from eslintNathan Zeplowitz2015-07-071-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | Based on the discussion at https://github.com/Gillespie59/eslint-plugin-angular/issues/114 it seems that the rule is only applicable when the watches are assigned on the $rootScope. This rule is also not a part of the JP style guide. Change-Id: Ic8c218c7d46229a4a2e7d9dcd951433aedd9d1ca Partially-Implements: blueprint jscs-cleanup
* | Change the ESLINT controller as to ctrlTravis Tripp2015-07-091-0/+8
|/ | | | | | | | | | This rule forces the controller to be named vm. This is too strict and also is a very overload term in OpenStack. So, making this a warning and looking for ctrl. Change-Id: Ieadf2f0b2d91c3c6979a6a65652d37f0c2980178 Partially-Implements: blueprint jscs-cleanup
* Switched from JSCS to ESLintMichael Krotscheck2015-06-301-0/+833
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