1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-11 08:04:59 +02:00

Switch to eslint-config-xo and eslint-plugin-unicorn.

This commit is contained in:
XhmikosR
2019-02-21 15:55:16 +02:00
parent 8896827bd0
commit 44e6abcba5
7 changed files with 419 additions and 280 deletions

View File

@@ -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"
}
}

View File

@@ -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')