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/assets/js
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2017-12-16 14:44:17 +0300
committerXhmikosR <xhmikosr@gmail.com>2018-01-11 19:48:46 +0300
commit6d336502c7e26c4cc5b35f1d7a19c067b774cb1f (patch)
tree249843876c99ceda24f3a1a65006a5753811d4e9 /assets/js
parent92cc0aba7be08add9833e1303088928363c3c199 (diff)
Clean up and tweak ESLint rules.
Also, refactor ESLint and stylelint config files; now everything will work from our root dir.
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/.eslintrc.json26
-rw-r--r--assets/js/src/ie-emulation-modes-warning.js1
2 files changed, 27 insertions, 0 deletions
diff --git a/assets/js/.eslintrc.json b/assets/js/.eslintrc.json
new file mode 100644
index 0000000000..7ea25a91ba
--- /dev/null
+++ b/assets/js/.eslintrc.json
@@ -0,0 +1,26 @@
+{
+ "env": {
+ "es6": false,
+ "jquery": true
+ },
+ "parserOptions": {
+ "ecmaVersion": 5,
+ "sourceType": "script"
+ },
+ "extends": "../../.eslintrc.json",
+ "rules": {
+ // Best Practices
+ "no-magic-numbers": "off",
+ "vars-on-top": "off",
+
+ // Stylistic Issues
+ "spaced-comment": "off",
+
+ // ECMAScript 6
+ "no-var": "off",
+ "object-shorthand": "off",
+ "prefer-arrow-callback": "off",
+ "prefer-template": "off",
+ "prefer-rest-params": "off"
+ }
+}
diff --git a/assets/js/src/ie-emulation-modes-warning.js b/assets/js/src/ie-emulation-modes-warning.js
index c8984cc35f..ca2ae1222b 100644
--- a/assets/js/src/ie-emulation-modes-warning.js
+++ b/assets/js/src/ie-emulation-modes-warning.js
@@ -41,6 +41,7 @@
var nonEmulated = actualNonEmulatedIEMajorVersion()
if (emulated !== nonEmulated) {
+ // eslint-disable-next-line no-alert
window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!')
}
}())