0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-13 01:08:58 +01:00
Bootstrap/js/.eslintrc.json

242 lines
7.0 KiB
JSON
Raw Normal View History

2015-08-19 04:22:46 +02:00
{
2016-10-25 14:18:52 +02:00
"root": true,
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true,
"jquery": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module"
},
"rules": {
// Possible Errors
2017-03-12 06:01:14 +01:00
"no-await-in-loop": "error",
"no-compare-neg-zero": "error",
2016-10-25 14:18:52 +02:00
"no-extra-parens": "error",
"no-prototype-builtins": "off",
"no-template-curly-in-string": "error",
"valid-jsdoc": "error",
2015-08-19 04:22:46 +02:00
2016-10-25 14:18:52 +02:00
// Best Practices
"accessor-pairs": "error",
"array-callback-return": "error",
"block-scoped-var": "error",
"class-methods-use-this": "off",
"complexity": "error",
"consistent-return": "error",
"curly": "error",
"default-case": "error",
"dot-location": ["error", "property"],
"dot-notation": "error",
"eqeqeq": "error",
"guard-for-in": "error",
"no-alert": "error",
"no-caller": "error",
"no-div-regex": "error",
"no-else-return": "error",
"no-empty-function": "error",
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-invalid-this": "off",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-magic-numbers": ["error", {
"ignore": [-1, 0, 1],
"ignoreArrayIndexes": true
}
],
"no-multi-spaces": ["error", {
"ignoreEOLComments": true,
2016-10-25 14:18:52 +02:00
"exceptions": {
"AssignmentExpression": true,
"ArrowFunctionExpression": true,
"CallExpression": true,
"VariableDeclarator": true
}
}
],
"no-multi-str": "error",
2017-03-12 06:01:14 +01:00
"no-new": "error",
"no-new-func": "error",
2016-10-25 14:18:52 +02:00
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-param-reassign": "off",
"no-proto": "error",
"no-restricted-properties": "error",
"no-return-assign": "off",
2017-03-12 06:01:14 +01:00
"no-return-await": "error",
2016-10-25 14:18:52 +02:00
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
2017-03-12 06:01:14 +01:00
"no-useless-return": "off",
2016-10-25 14:18:52 +02:00
"no-void": "error",
"no-warning-comments": "off",
"no-with": "error",
2017-03-12 06:01:14 +01:00
"prefer-promise-reject-errors": "error",
2016-10-25 14:18:52 +02:00
"radix": "error",
"require-await": "error",
2016-10-25 14:18:52 +02:00
"vars-on-top": "error",
"wrap-iife": "error",
"yoda": "error",
2015-08-19 04:22:46 +02:00
2016-10-25 14:18:52 +02:00
// Strict Mode
"strict": "error",
2015-08-19 04:22:46 +02:00
2016-10-25 14:18:52 +02:00
// Variables
"init-declarations": "off",
"no-catch-shadow": "error",
"no-label-var": "error",
"no-restricted-globals": "error",
"no-shadow": "off",
2017-03-12 06:01:14 +01:00
"no-shadow-restricted-names": "error",
2016-10-25 14:18:52 +02:00
"no-undef-init": "error",
"no-undefined": "off",
"no-use-before-define": "off",
2015-08-19 04:22:46 +02:00
2016-10-25 14:18:52 +02:00
// Node.js and CommonJS
"callback-return": "off",
"global-require": "error",
"handle-callback-err": "error",
"no-mixed-requires": "error",
"no-new-require": "error",
"no-path-concat": "error",
"no-process-env": "error",
"no-process-exit": "error",
"no-restricted-modules": "error",
"no-sync": "error",
2015-08-19 04:22:46 +02:00
2016-10-25 14:18:52 +02:00
// Stylistic Issues
"array-bracket-spacing": "error",
"block-spacing": "error",
"brace-style": "error",
"camelcase": "error",
"capitalized-comments": "off",
2016-10-25 14:18:52 +02:00
"comma-dangle": "error",
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": "error",
"consistent-this": "error",
"eol-last": "error",
"func-call-spacing": "error",
2017-03-12 06:01:14 +01:00
"func-name-matching": "error",
2016-10-25 14:18:52 +02:00
"func-names": "off",
"func-style": ["error", "declaration"],
"id-blacklist": "error",
"id-length": "off",
"id-match": "error",
"indent": "off",
"indent-legacy": ["error", 2, { "SwitchCase": 1 }],
2016-10-25 14:18:52 +02:00
"jsx-quotes": "error",
"key-spacing": "off",
"keyword-spacing": "error",
"line-comment-position": "off",
"linebreak-style": ["error", "unix"],
"lines-around-comment": "off",
"lines-around-directive": "error",
"max-depth": ["error", 10],
"max-len": "off",
"max-lines": "off",
"max-nested-callbacks": "error",
"max-params": "off",
"max-statements": "off",
2017-03-12 06:01:14 +01:00
"max-statements-per-line": "error",
2016-10-25 14:18:52 +02:00
"multiline-ternary": "off",
"new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }],
"new-parens": "error",
"newline-after-var": "off",
"newline-before-return": "off",
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
"no-array-constructor": "error",
"no-bitwise": "error",
"no-continue": "off",
"no-inline-comments": "off",
"no-lonely-if": "error",
"no-mixed-operators": "off",
2017-03-12 06:01:14 +01:00
"no-multi-assign": "error",
2016-10-25 14:18:52 +02:00
"no-multiple-empty-lines": "error",
"no-negated-condition": "off",
"no-nested-ternary": "error",
"no-new-object": "error",
"no-plusplus": "off",
"no-restricted-syntax": "error",
"no-tabs": "error",
"no-ternary": "off",
"no-trailing-spaces": "error",
"no-underscore-dangle": "off",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
2017-03-12 06:01:14 +01:00
"nonblock-statement-body-position": "error",
2016-10-25 14:18:52 +02:00
"object-curly-newline": ["error", { "minProperties": 1 }],
"object-curly-spacing": ["error", "always"],
"object-property-newline": "error",
"one-var": ["error", "never"],
2017-03-12 06:01:14 +01:00
"one-var-declaration-per-line": "error",
2016-10-25 14:18:52 +02:00
"operator-assignment": "error",
"operator-linebreak": "off",
"padded-blocks": "off",
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single"],
"require-jsdoc": "off",
"semi": ["error", "never"],
2017-03-12 06:01:14 +01:00
"semi-spacing": "error",
2016-10-25 14:18:52 +02:00
"sort-keys": "off",
"sort-vars": "error",
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never"
}],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
2017-03-12 06:01:14 +01:00
"template-tag-spacing": "error",
2016-10-25 14:18:52 +02:00
"unicode-bom": "error",
"wrap-regex": "off",
2015-08-19 04:22:46 +02:00
2016-10-25 14:18:52 +02:00
// ECMAScript 6
"arrow-body-style": "off",
"arrow-parens": "error",
"arrow-spacing": "error",
"generator-star-spacing": "error",
"no-confusing-arrow": "error",
"no-duplicate-imports": "error",
"no-restricted-imports": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-useless-rename": "error",
"no-var": "error",
"object-shorthand": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": "off",
2016-10-25 14:18:52 +02:00
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"rest-spread-spacing": "error",
"sort-imports": "error",
"symbol-description": "error",
"template-curly-spacing": "error",
"yield-star-spacing": "error"
}
2015-08-19 04:22:46 +02:00
}