dotfiles/.eslintrc.json

117 lines
4.0 KiB
JSON
Raw Normal View History

2019-05-28 17:44:30 +02:00
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"parserOptions": {
"ecmaFeatures": {"jsx": true},
"ecmaVersion": 9,
"sourceType": "script"
},
"rules": {
"accessor-pairs": ["warn", {"setWithoutGet": true}],
"array-bracket-spacing": ["warn", "never"],
"arrow-spacing": ["warn", {"after": true, "before": true}],
"block-scoped-var": "warn",
"brace-style": ["warn", "1tbs", {"allowSingleLine": true}],
"comma-dangle": ["warn", "never"],
"comma-spacing": ["warn", {"after": true}],
"comma-style": ["warn", "last"],
"complexity": ["warn", 20],
"consistent-this": ["warn", "self"],
"constructor-super": "warn",
"dot-location": ["warn", "property"],
"dot-notation": "warn",
"eol-last": "warn",
"indent": ["warn", 2, {"SwitchCase": 1}],
"key-spacing": ["warn", {"afterColon": true}],
"linebreak-style": ["warn", "unix"],
"max-nested-callbacks": ["warn", 10],
"new-cap": "warn",
"new-parens": "warn",
"no-catch-shadow": "warn",
"no-cond-assign": ["warn", "except-parens"],
"no-const-assign": "error",
"no-delete-var": "warn",
"no-div-regex": "warn",
"no-dupe-args": "warn",
"no-dupe-keys": "warn",
"no-duplicate-case": "error",
"no-empty-character-class": "warn",
"no-eq-null": "warn",
"no-ex-assign": "warn",
"no-extra-boolean-cast": "warn",
"no-extra-parens": ["warn", "functions"],
"no-extra-semi": "warn",
"no-fallthrough": "error",
"no-floating-decimal": "warn",
"no-func-assign": "warn",
"no-implicit-coercion": ["warn", {"boolean": true, "number": true}],
"no-inner-declarations": ["warn", "functions"],
"no-invalid-regexp": "error",
"no-irregular-whitespace": "warn",
"no-labels": "error",
"no-lone-blocks": "warn",
"no-lonely-if": "warn",
"no-loop-func": "warn",
"no-mixed-spaces-and-tabs": "warn",
"no-multi-spaces": "warn",
"no-multi-str": "warn",
"no-multiple-empty-lines": ["warn", {"max": 2, "maxBOF": 0, "maxEOF": 1}],
"no-negated-in-lhs": "warn",
"no-nested-ternary": "warn",
"no-new": "warn",
"no-new-func": "warn",
"no-new-object": "warn",
"no-new-require": "warn",
"no-new-wrappers": "warn",
"no-obj-calls": "warn",
"no-octal": "warn",
"no-octal-escape": "warn",
"no-path-concat": "warn",
"no-redeclare": ["warn", {"builtinGlobals": true}],
"no-regex-spaces": "warn",
"no-return-assign": ["warn", "except-parens"],
"no-script-url": "warn",
"no-self-compare": "warn",
"no-sequences": "warn",
"no-shadow": ["warn", {"builtinGlobals": true, "hoist": "functions", "allow": ["self"]}],
"no-shadow-restricted-names": "warn",
"no-spaced-func": "warn",
"no-throw-literal": "error",
"no-trailing-spaces": "warn",
"no-undef": "warn",
"no-undefined": "warn",
"no-unexpected-multiline": "warn",
"no-unneeded-ternary": "warn",
"no-unreachable": "warn",
"no-unused-expressions": "warn",
"no-use-before-define": "warn",
"no-var": "warn",
"no-void": "warn",
"no-warning-comments": ["warn", {"location": "anywhere", "terms": ["TODO", " FIXME", " BUG"]}],
"object-curly-spacing": ["warn", "never", {}],
"object-shorthand": ["warn", "always"],
"one-var": ["warn", {"const": "never", "let": "consecutive", "var": "consecutive", "separateRequires": true}],
"operator-assignment": ["warn", "always"],
"operator-linebreak": ["warn", "after"],
"prefer-const": "warn",
"quote-props": ["warn", "consistent"],
"quotes": ["warn", "single", "avoid-escape"],
"semi": ["warn", "always", {"omitLastInOneLineBlock": true}],
"space-in-parens": ["warn", "never", {}],
"spaced-comment": ["warn", "always", {}],
"valid-typeof": "error",
"wrap-iife": ["warn", "inside", {"functionPrototypeMethods": true}],
"wrap-regex": "warn",
"yoda": ["warn", "never", {"exceptRange": true}]
},
"overrides": [
{
"files": "**/*.babel.js",
"parserOptions": {"sourceType": "module"}
}
]
}