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:
authorXhmikosR <xhmikosr@gmail.com>2019-02-21 16:55:16 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-03-11 18:01:28 +0300
commit44e6abcba50309df4fae56a9c7ef79145b64a356 (patch)
tree52cbc26a6bc4faf1b61f271619ef0fd50775e8c6 /js
parent8896827bd072a120705a0576a5bcde69c8ce2cda (diff)
Switch to eslint-config-xo and eslint-plugin-unicorn.
Diffstat (limited to 'js')
-rw-r--r--js/tests/unit/.eslintrc.json48
-rw-r--r--js/tests/unit/tab.js2
2 files changed, 31 insertions, 19 deletions
diff --git a/js/tests/unit/.eslintrc.json b/js/tests/unit/.eslintrc.json
index 19ab5d9986..cafe9c04e5 100644
--- a/js/tests/unit/.eslintrc.json
+++ b/js/tests/unit/.eslintrc.json
@@ -1,6 +1,6 @@
{
+ "root": true,
"env": {
- "es6": false,
"jquery": true,
"qunit": true
},
@@ -23,23 +23,35 @@
"ecmaVersion": 5,
"sourceType": "script"
},
- "extends": "../../../.eslintrc.json",
+ "extends": [
+ "plugin:unicorn/recommended",
+ "xo",
+ "xo/browser"
+ ],
"rules": {
- "no-console": "error",
- // Best Practices
- "consistent-return": "off",
- "no-magic-numbers": "off",
- "vars-on-top": "off",
-
- // Stylistic Issues
- "func-style": "off",
- "spaced-comment": "off",
-
- // ECMAScript 6
- "no-var": "off",
- "object-shorthand": "off",
- "prefer-arrow-callback": "off",
- "prefer-template": "off",
- "prefer-rest-params": "off"
+ "capitalized-comments": "off",
+ "indent": [
+ "error",
+ 2,
+ {
+ "MemberExpression": "off",
+ "SwitchCase": 1
+ }
+ ],
+ "multiline-ternary": [
+ "error",
+ "always-multiline"
+ ],
+ "object-curly-spacing": [
+ "error",
+ "always"
+ ],
+ "semi": [
+ "error",
+ "never"
+ ],
+ "strict": "error",
+ "unicorn/filename-case": "off",
+ "unicorn/no-unused-properties": "error"
}
}
diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js
index 114e976100..0675126f8f 100644
--- a/js/tests/unit/tab.js
+++ b/js/tests/unit/tab.js
@@ -1,7 +1,7 @@
$(function () {
'use strict'
- var Tab = typeof window.bootstrap !== 'undefined' ? window.bootstrap.Tab : window.Tab
+ var Tab = typeof window.bootstrap === 'undefined' ? window.Tab : window.bootstrap.Tab
QUnit.module('tabs plugin')