summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Kramskikh <vkramskikh@mirantis.com>2016-05-11 20:14:03 +0300
committerMichael Krotscheck <krotscheck@gmail.com>2016-05-12 16:01:19 +0000
commita3151bef1d75b847456f021d57b4fda3a0e18746 (patch)
treec8f6bdb06ad045113b1e4d2708f42de26298d3af
parent5c164b6bea214ea3e776327e86aeff7d6b8a1935 (diff)
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
Notes
Notes (review): Code-Review+1: Michael Krotscheck <krotscheck@gmail.com> Code-Review+1: Vitaly Kramskikh <vkramskikh@mirantis.com> Code-Review+1: Julia Aranovich <jkirnosova@mirantis.com> Code-Review+2: Timur Sufiev <tsufiev@mirantis.com> Code-Review+1: Kate Pimenova <kpimenova@mirantis.com> Code-Review+1: Nick Bogdanov <nbogdanov@mirantis.com> Workflow+1: Michael Krotscheck <krotscheck@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 18 May 2016 15:29:33 +0000 Reviewed-on: https://review.openstack.org/315177 Project: openstack/eslint-config-openstack Branch: refs/heads/master
-rw-r--r--.eslintrc55
-rw-r--r--spec/index.js10
2 files changed, 28 insertions, 37 deletions
diff --git a/.eslintrc b/.eslintrc
index 2c821ce..2e9dda8 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -46,7 +46,7 @@ env:
46 # OpenStack uses Jasmine, not Mocha. 46 # OpenStack uses Jasmine, not Mocha.
47 # mocha: false 47 # mocha: false
48 48
49 # Openstack does not support ES6 at its present level of adoption. 49 # Enables ES6 flags in ecmaFeatures.
50 # es6: false 50 # es6: false
51 51
52 52
@@ -847,7 +847,7 @@ rules:
847 847
848 848
849 ############################################################################# 849 #############################################################################
850 # ECMAScript 6 (All Off) 850 # ECMAScript 6
851 ############################################################################# 851 #############################################################################
852 # require braces in arrow function body 852 # require braces in arrow function body
853 # http://eslint.org/docs/rules/arrow-body-style 853 # http://eslint.org/docs/rules/arrow-body-style
@@ -976,28 +976,29 @@ rules:
976 no-plusplus: 0 976 no-plusplus: 0
977 977
978 978
979# We only support ECMA5, disable everything else. 979# Parser options are used to specify language-level options which you want to
980ecmaFeatures: 980# supprt. The defaults enable ECMAScript 5, which may be overridden on a per
981 arrowFunctions: false 981# project basis. Please enable these settings to meet the needs of your own
982 binaryLiterals: false 982# project.
983 blockBindings: false 983#
984 classes: false 984parserOptions:
985 defaultParams: false 985
986 destructuring: false 986 # The ECMAScript version. Supported values are: 3, 5, 6, 7.
987 forOf: false 987 # ecmaVersion: 5
988 generators: false 988
989 modules: false 989 # Set sourceType to "module" if your project uses ES6 modules.
990 objectLiteralComputedProperties: false 990 # sourceType: script
991 objectLiteralDuplicateProperties: false 991
992 objectLiteralShorthandMethods: false 992 ecmaFeatures:
993 objectLiteralShorthandProperties: false 993
994 octalLiterals: false 994 # Permit return statements in the global scope.
995 regexUFlag: false 995 globalReturn: false
996 regexYFlag: false 996
997 restParams: false 997 # Enable global strict mode (if ecmaVersion is 5 or greater)
998 spread: false 998 impliedStrict: false
999 superInFunctions: false 999
1000 templateStrings: false 1000 # Enable JSX
1001 unicodeCodePointEscapes: false 1001 jsx: false
1002 globalReturn: false 1002
1003 jsx: false 1003 # Enable support for the experimental object rest/spread properties
1004 experimentalObjectRestSpread: false
diff --git a/spec/index.js b/spec/index.js
index 3a0c26b..d9ba627 100644
--- a/spec/index.js
+++ b/spec/index.js
@@ -6,16 +6,6 @@ describe("Unit: eslint-config-openstack", function() {
6 expect(config.parser).toEqual('espree'); 6 expect(config.parser).toEqual('espree');
7 }); 7 });
8 8
9 it("should disable all ecma6 features.", function() {
10 var config = require('../index');
11
12 var keys = Object.keys(config.ecmaFeatures);
13
14 keys.forEach(function(key) {
15 expect(config.ecmaFeatures[key]).toBeFalsy();
16 });
17 });
18
19 it("should disable all environments.", function() { 9 it("should disable all environments.", function() {
20 var config = require('../index'); 10 var config = require('../index');
21 expect(config.env).toBeFalsy(); 11 expect(config.env).toBeFalsy();