aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2016-05-31 01:16:05 -0700
committerChris Rebert <[email protected]>2016-05-31 01:16:05 -0700
commit97f521d5dd6f0b88f2b7b0daaaaa70ec2a535e54 (patch)
treeda5430f2090ed5299a34a2e1fdf70a2c5ce4615b /js
parentf7677d6be5a5465df30a50a6a8c0c733a5fa44b8 (diff)
parent93f028b8f109dba44ac79edea89027a2f2b609ad (diff)
downloadbootstrap-97f521d5dd6f0b88f2b7b0daaaaa70ec2a535e54.tar.xz
bootstrap-97f521d5dd6f0b88f2b7b0daaaaa70ec2a535e54.zip
Merge pull request #19998 from twbs/eslint-2.0.0
Upgrade to ESLint v2.0.0
Diffstat (limited to 'js')
-rw-r--r--js/.eslintrc.json11
-rw-r--r--js/src/scrollspy.js1
-rw-r--r--js/src/util.js1
3 files changed, 10 insertions, 3 deletions
diff --git a/js/.eslintrc.json b/js/.eslintrc.json
index 619df7cb3..5624d0c10 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": {
@@ -33,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,
@@ -55,7 +61,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 +130,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 +159,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
@@ -170,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,
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
}
}
}