Commit Graph

6 Commits

Author SHA1 Message Date
Vitaly Kramskikh a3151bef1d Update descriptions of ES6-related options
OpenStack starts to support ES6, so the config has been updated
with instructions how to enable ES6 support.

"ecmaFeatures" were moved under "parserOptions" as it's required
by ESLint 2.x, all ES6-related flags were removed as they're
enabled using env.es6.

Change-Id: I5531534e2ab12ece0859816679aa19deb974957e
2016-05-12 16:01:19 +00:00
Michael Krotscheck cba4c7042d Enable strict
This enables the function form of the "use strict" invocation. In
general, 'strict' is considered a good practice, so enabling it
is good. Requiring the function method of use strict avoid a
common bug encountered with a global strict declaration, where
the rule applies to all javascript that comes after the global
"use strict" statement. Using the function method prevents
brittleness, by creating a scope around the 'strict' case.

http://eslint.org/docs/rules/strict

Change-Id: I5c89c26d2d7a38c342e7c8f49f8cabe145dd02c0
2015-09-22 10:24:59 -07:00
Michael Krotscheck d67ab88e21 Added test for new rules
This patch adds unit tests that ensure new rules - added by an eslint
upgrade perhaps - are not missed. The patch also adds those rules
that have already fallen through the cracks.

Change-Id: Idf84af253995690bd7043813a8c891c96f443e0f
2015-09-21 15:44:51 +00:00
Michael Krotscheck 234f228f74 Add test to alert for rule replacements.
Eslint carries forward a replacement list that indicates when a
rule is about to be renamed/deprecated. This unit test checks our
rules against that list, and will fail if it detects a pending
replacement.

Change-Id: If1a20c2f6dd198f8ee9e38625977885e29f05303
2015-08-28 09:43:57 -07:00
Michael Krotscheck bf3239b331 Add unit test for zombie rules.
This unit test goes through all the active rules in the current
installed version of eslint, and errors on every one which
we declare that is no longer in the upstream package. This will
prevent us from having to carry forward out-of-date configuration.

Change-Id: I68a6ad63f4f7ac32a9de6ae8859ffa791a03afe6
2015-08-28 09:43:33 -07:00
Michael Krotscheck 4aecdfd567 Initial Commit
This module creates a set of shareable eslint style guidelines
for use in OpenStack. The base rule set is taken from the current
horizon rules under consideration.
2015-06-23 18:40:37 -07:00