From 0efec1a3db9d9bc15dd6b71f12fe31729475e062 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 31 May 2016 00:39:36 -0700 Subject: Migrate ESLint rules config to ESLint 2.0.0 Refs http://eslint.org/docs/user-guide/migrating-to-2.0.0 --- js/.eslintrc.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'js') diff --git a/js/.eslintrc.json b/js/.eslintrc.json index 619df7cb3..b866b125b 100644 --- a/js/.eslintrc.json +++ b/js/.eslintrc.json @@ -55,7 +55,6 @@ "no-case-declarations": 2, "no-div-regex": 2, "no-else-return": 2, - "no-empty-label": 2, "no-eq-null": 2, "no-eval": 2, "no-extend-native": 2, @@ -125,6 +124,7 @@ "func-style": 0, "indent": [2, 2, {"SwitchCase": 1}], "key-spacing": 0, + "keyword-spacing": 2, "linebreak-style": 2, "lines-around-comment": 0, "new-cap": 0, @@ -153,13 +153,11 @@ "semi": [2, "never"], "semi-spacing": 2, "sort-vars": 2, - "space-after-keywords": 2, "space-before-blocks": 2, "space-before-function-paren": 0, "spaced-comment": 2, "space-infix-ops": 2, "space-in-parens": 2, - "space-return-throw-case": 2, "space-unary-ops": 2, // es6 -- cgit v1.2.3 From c4add0c2f30b8404bd1d227b16d7668a236c1d63 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 31 May 2016 00:45:32 -0700 Subject: Comply with consistent-return ESLint rule --- js/src/scrollspy.js | 1 + js/src/util.js | 1 + 2 files changed, 2 insertions(+) (limited to 'js') diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index b9186db00..001f7f56c 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -140,6 +140,7 @@ const ScrollSpy = (($) => { targetSelector ] } + return null }) .filter((item) => item) .sort((a, b) => a[0] - b[0]) diff --git a/js/src/util.js b/js/src/util.js index 070c5ea75..b779c448f 100644 --- a/js/src/util.js +++ b/js/src/util.js @@ -42,6 +42,7 @@ const Util = (($) => { if ($(event.target).is(this)) { return event.handleObj.handler.apply(this, arguments) } + return undefined } } } -- cgit v1.2.3 From 4d3bd8e6c5da15f9427b84e192c5f0b602f54c7f Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 31 May 2016 00:46:33 -0700 Subject: Migrate parser & env config to ESLint 2.0.0 --- js/.eslintrc.json | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js') diff --git a/js/.eslintrc.json b/js/.eslintrc.json index b866b125b..11e8f26ef 100644 --- a/js/.eslintrc.json +++ b/js/.eslintrc.json @@ -1,8 +1,13 @@ { "root": true, "parser": "babel-eslint", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, "env": { "browser": true, + "es6": true, "jquery": true }, "rules": { -- cgit v1.2.3 From 92e9d9de62dc246f268debd79abf76fdcdc875f8 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 31 May 2016 00:49:48 -0700 Subject: Enable new ESLint-recommended rules in ESLint config Refs http://eslint.org/docs/user-guide/migrating-to-2.0.0#new-rules-in-eslintrecommended --- js/.eslintrc.json | 2 ++ 1 file changed, 2 insertions(+) (limited to 'js') diff --git a/js/.eslintrc.json b/js/.eslintrc.json index 11e8f26ef..5624d0c10 100644 --- a/js/.eslintrc.json +++ b/js/.eslintrc.json @@ -38,6 +38,7 @@ "no-negated-in-lhs": 2, "no-obj-calls": 2, "no-regex-spaces": 2, + "no-self-assign": 2, "no-sparse-arrays": 2, "no-unexpected-multiline": 2, "no-unreachable": 2, @@ -173,6 +174,7 @@ "no-class-assign": 2, "no-const-assign": 2, "no-dupe-class-members": 2, + "no-new-symbol": 2, "no-this-before-super": 2, "no-var": 2, "object-shorthand": 2, -- cgit v1.2.3