2015-08-18 22:22:46 -04:00
|
|
|
{
|
2016-10-25 08:18:52 -04:00
|
|
|
"root": true,
|
|
|
|
"parser": "babel-eslint",
|
|
|
|
"env": {
|
|
|
|
"browser": true,
|
2017-10-04 10:31:35 -04:00
|
|
|
"es6": true
|
2016-10-25 08:18:52 -04:00
|
|
|
},
|
2018-06-21 09:59:47 -04:00
|
|
|
"extends": ["eslint:recommended", "plugin:compat/recommended"],
|
2016-10-25 08:18:52 -04:00
|
|
|
"rules": {
|
|
|
|
// Possible Errors
|
2017-03-12 00:01:14 -05:00
|
|
|
"no-await-in-loop": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"no-extra-parens": "error",
|
2017-07-27 06:39:55 -04:00
|
|
|
"no-prototype-builtins": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"no-template-curly-in-string": "error",
|
|
|
|
"valid-jsdoc": "error",
|
2015-08-18 22:22:46 -04:00
|
|
|
|
2016-10-25 08:18:52 -04: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", {
|
2017-07-28 02:18:47 -04:00
|
|
|
"ignoreEOLComments": true,
|
2016-10-25 08:18:52 -04:00
|
|
|
"exceptions": {
|
|
|
|
"AssignmentExpression": true,
|
|
|
|
"ArrowFunctionExpression": true,
|
|
|
|
"CallExpression": true,
|
|
|
|
"VariableDeclarator": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"no-multi-str": "error",
|
2017-03-12 00:01:14 -05:00
|
|
|
"no-new": "error",
|
2017-04-20 06:33:51 -04:00
|
|
|
"no-new-func": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"no-new-wrappers": "error",
|
|
|
|
"no-octal-escape": "error",
|
|
|
|
"no-param-reassign": "off",
|
|
|
|
"no-proto": "error",
|
|
|
|
"no-restricted-properties": "error",
|
2017-07-27 06:58:22 -04:00
|
|
|
"no-return-assign": "error",
|
2017-03-12 00:01:14 -05:00
|
|
|
"no-return-await": "error",
|
2016-10-25 08:18:52 -04: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",
|
2017-12-16 06:44:17 -05:00
|
|
|
"no-useless-return": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"no-void": "error",
|
|
|
|
"no-warning-comments": "off",
|
|
|
|
"no-with": "error",
|
2017-03-12 00:01:14 -05:00
|
|
|
"prefer-promise-reject-errors": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"radix": "error",
|
2017-04-20 06:33:51 -04:00
|
|
|
"require-await": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"vars-on-top": "error",
|
|
|
|
"wrap-iife": "error",
|
|
|
|
"yoda": "error",
|
2015-08-18 22:22:46 -04:00
|
|
|
|
2016-10-25 08:18:52 -04:00
|
|
|
// Strict Mode
|
|
|
|
"strict": "error",
|
2015-08-18 22:22:46 -04:00
|
|
|
|
2016-10-25 08:18:52 -04:00
|
|
|
// Variables
|
|
|
|
"init-declarations": "off",
|
|
|
|
"no-catch-shadow": "error",
|
|
|
|
"no-label-var": "error",
|
|
|
|
"no-restricted-globals": "error",
|
|
|
|
"no-shadow": "off",
|
2017-03-12 00:01:14 -05:00
|
|
|
"no-shadow-restricted-names": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"no-undef-init": "error",
|
2017-07-27 06:39:55 -04:00
|
|
|
"no-undefined": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"no-use-before-define": "off",
|
2015-08-18 22:22:46 -04:00
|
|
|
|
2016-10-25 08:18:52 -04: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-18 22:22:46 -04:00
|
|
|
|
2016-10-25 08:18:52 -04:00
|
|
|
// Stylistic Issues
|
|
|
|
"array-bracket-spacing": "error",
|
|
|
|
"block-spacing": "error",
|
|
|
|
"brace-style": "error",
|
|
|
|
"camelcase": "error",
|
2017-04-20 06:33:51 -04:00
|
|
|
"capitalized-comments": "off",
|
2016-10-25 08:18:52 -04: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 00:01:14 -05:00
|
|
|
"func-name-matching": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"func-names": "off",
|
|
|
|
"func-style": ["error", "declaration"],
|
|
|
|
"id-blacklist": "error",
|
|
|
|
"id-length": "off",
|
|
|
|
"id-match": "error",
|
2017-12-16 06:44:17 -05:00
|
|
|
"indent": ["error", 2, { "SwitchCase": 1 }],
|
2016-10-25 08:18:52 -04:00
|
|
|
"jsx-quotes": "error",
|
|
|
|
"key-spacing": "off",
|
|
|
|
"keyword-spacing": "error",
|
|
|
|
"linebreak-style": ["error", "unix"],
|
2017-12-16 06:44:17 -05:00
|
|
|
"line-comment-position": "off",
|
2016-10-25 08:18:52 -04:00
|
|
|
"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 00:01:14 -05:00
|
|
|
"max-statements-per-line": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"multiline-ternary": "off",
|
|
|
|
"new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }],
|
|
|
|
"newline-after-var": "off",
|
|
|
|
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
|
2017-12-16 06:44:17 -05:00
|
|
|
"new-parens": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"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 00:01:14 -05:00
|
|
|
"no-multi-assign": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"no-multiple-empty-lines": "error",
|
2017-12-16 06:44:17 -05:00
|
|
|
"nonblock-statement-body-position": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"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",
|
|
|
|
"object-curly-newline": ["error", { "minProperties": 1 }],
|
|
|
|
"object-curly-spacing": ["error", "always"],
|
|
|
|
"object-property-newline": "error",
|
|
|
|
"one-var": ["error", "never"],
|
2017-03-12 00:01:14 -05:00
|
|
|
"one-var-declaration-per-line": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"operator-assignment": "error",
|
2017-12-16 06:44:17 -05:00
|
|
|
"operator-linebreak": "error",
|
|
|
|
"padded-blocks": ["error", "never"],
|
|
|
|
"padding-line-between-statements": "off",
|
2016-10-25 08:18:52 -04:00
|
|
|
"quote-props": ["error", "as-needed"],
|
|
|
|
"quotes": ["error", "single"],
|
|
|
|
"require-jsdoc": "off",
|
|
|
|
"semi": ["error", "never"],
|
2017-03-12 00:01:14 -05:00
|
|
|
"semi-spacing": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"sort-keys": "off",
|
|
|
|
"sort-vars": "error",
|
|
|
|
"space-before-blocks": "error",
|
|
|
|
"space-before-function-paren": ["error", {
|
2017-12-16 06:44:17 -05:00
|
|
|
"anonymous": "always",
|
|
|
|
"named": "never"
|
2016-10-25 08:18:52 -04:00
|
|
|
}],
|
|
|
|
"space-in-parens": "error",
|
|
|
|
"space-infix-ops": "error",
|
|
|
|
"space-unary-ops": "error",
|
|
|
|
"spaced-comment": "error",
|
2017-03-12 00:01:14 -05:00
|
|
|
"template-tag-spacing": "error",
|
2016-10-25 08:18:52 -04:00
|
|
|
"unicode-bom": "error",
|
|
|
|
"wrap-regex": "off",
|
2015-08-18 22:22:46 -04:00
|
|
|
|
2016-10-25 08:18:52 -04:00
|
|
|
// ECMAScript 6
|
2017-07-27 06:39:55 -04:00
|
|
|
"arrow-body-style": ["error", "as-needed"],
|
2016-10-25 08:18:52 -04:00
|
|
|
"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",
|
2017-04-20 06:33:51 -04:00
|
|
|
"prefer-destructuring": "off",
|
2016-10-25 08:18:52 -04: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-18 22:22:46 -04:00
|
|
|
}
|