Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorChris Rebert <github@chrisrebert.com>2016-06-05 21:17:05 +0300
committerChris Rebert <github@chrisrebert.com>2016-06-05 21:17:05 +0300
commitc955868982e6a6647fa3b722bf42f73f6d513f79 (patch)
tree0dc648c07a630c9f7fdbca0b3fc4a9fc224783cb /js
parent36f2261b6ffff5d4803317fc4fd231769f625295 (diff)
Enable more rules from ESLint 2.0; refs #19999 (#20076)
[skip sauce] [skip validator]
Diffstat (limited to 'js')
-rw-r--r--js/.eslintrc.json9
-rw-r--r--js/src/util.js2
2 files changed, 10 insertions, 1 deletions
diff --git a/js/.eslintrc.json b/js/.eslintrc.json
index 0e9e9fa75d..746f899f01 100644
--- a/js/.eslintrc.json
+++ b/js/.eslintrc.json
@@ -13,6 +13,7 @@
"rules": {
// Possible Errors
+ "array-callback-return": "error",
"comma-dangle": ["error", "never"],
"handle-callback-err": "error",
"no-bitwise": "error",
@@ -27,9 +28,11 @@
"no-duplicate-imports": "error",
"no-empty": "error",
"no-empty-character-class": "error",
+ "no-empty-function": "error",
"no-empty-pattern": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": "error",
+ "no-extra-label": "error",
"no-extra-parens": "off",
"no-extra-semi": "error",
"no-func-assign": "error",
@@ -43,7 +46,9 @@
"no-self-assign": "error",
"no-sparse-arrays": "error",
"no-unexpected-multiline": "error",
+ "no-unmodified-loop-condition": "error",
"no-unreachable": "error",
+ "no-unused-labels": "error",
"no-useless-escape": "error",
"no-useless-rename": "error",
"use-isnan": "error",
@@ -99,6 +104,7 @@
"no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
+ "no-useless-constructor": "error",
"no-void": "error",
"no-warning-comments": "off",
"no-with": "error",
@@ -157,7 +163,9 @@
"no-unneeded-ternary": "error",
"no-unsafe-finally": "error",
"no-useless-computed-key": "error",
+ "no-whitespace-before-property": "error",
"object-curly-spacing": ["warn", "always"],
+ "object-property-newline": "error",
"one-var": "off",
"operator-assignment": "error",
"operator-linebreak": "off",
@@ -189,6 +197,7 @@
"prefer-arrow-callback": "error",
"prefer-const": "off",
"prefer-reflect": "off",
+ "prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"require-yield": "error"
diff --git a/js/src/util.js b/js/src/util.js
index b779c448f4..86d9fe1f40 100644
--- a/js/src/util.js
+++ b/js/src/util.js
@@ -40,7 +40,7 @@ const Util = (($) => {
delegateType: transition.end,
handle(event) {
if ($(event.target).is(this)) {
- return event.handleObj.handler.apply(this, arguments)
+ return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params
}
return undefined
}