aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2016-06-04 14:28:34 -0700
committerChris Rebert <[email protected]>2016-06-04 14:28:34 -0700
commit2b16f5c5100c8a42bccad028903eadac2875e20c (patch)
tree1e177c185c1e98af237effb6f5c3e69ac5956663 /js
parentc5eb5a45e92888da4ecd926c4397ab56c41f163d (diff)
downloadbootstrap-2b16f5c5100c8a42bccad028903eadac2875e20c.tar.xz
bootstrap-2b16f5c5100c8a42bccad028903eadac2875e20c.zip
Update ESLint to v2.5.3 (#20043)
Refs #19908. [skip sauce] [skip validator]
Diffstat (limited to 'js')
-rw-r--r--js/.eslintrc.json3
-rw-r--r--js/src/carousel.js11
2 files changed, 11 insertions, 3 deletions
diff --git a/js/.eslintrc.json b/js/.eslintrc.json
index 1bf696dae..f64ef2e70 100644
--- a/js/.eslintrc.json
+++ b/js/.eslintrc.json
@@ -24,6 +24,7 @@
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
+ "no-duplicate-imports": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
@@ -43,6 +44,7 @@
"no-sparse-arrays": "error",
"no-unexpected-multiline": "error",
"no-unreachable": "error",
+ "no-useless-escape": "error",
"use-isnan": "error",
"valid-jsdoc": "off",
"valid-typeof": "error",
@@ -166,6 +168,7 @@
"space-infix-ops": "error",
"space-in-parens": "error",
"space-unary-ops": "error",
+ "max-statements-per-line": ["error", { "max": 1 }],
// es6
"arrow-parens": "error",
diff --git a/js/src/carousel.js b/js/src/carousel.js
index f990c699a..e24aed08f 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -238,9 +238,14 @@ const Carousel = (($) => {
}
switch (event.which) {
- case ARROW_LEFT_KEYCODE: this.prev(); break
- case ARROW_RIGHT_KEYCODE: this.next(); break
- default: return
+ case ARROW_LEFT_KEYCODE:
+ this.prev()
+ break
+ case ARROW_RIGHT_KEYCODE:
+ this.next()
+ break
+ default:
+ return
}
}