2020-12-15 14:25:01 +01:00
|
|
|
{
|
|
|
|
"env": {
|
2021-08-23 16:10:22 +02:00
|
|
|
"es2021": true,
|
2020-12-15 14:25:01 +01:00
|
|
|
"node": true
|
|
|
|
},
|
2021-08-23 16:10:22 +02:00
|
|
|
"extends": "eslint:recommended",
|
|
|
|
"plugins": [
|
|
|
|
"unicorn"
|
2020-12-15 14:25:01 +01:00
|
|
|
],
|
|
|
|
"rules": {
|
2021-08-23 16:10:22 +02:00
|
|
|
"arrow-body-style": ["warn", "as-needed"],
|
|
|
|
"brace-style": ["warn", "1tbs"],
|
|
|
|
"comma-dangle": ["warn", "never"],
|
|
|
|
"curly": ["warn", "all"],
|
|
|
|
"dot-location": ["warn", "property"],
|
|
|
|
"dot-notation": "warn",
|
|
|
|
"eol-last": ["warn", "always"],
|
|
|
|
"eqeqeq": "error",
|
2020-12-15 14:25:01 +01:00
|
|
|
"indent": ["warn", 4],
|
2021-08-23 16:10:22 +02:00
|
|
|
"key-spacing": ["warn", {
|
|
|
|
"afterColon": true,
|
|
|
|
"beforeColon": false,
|
|
|
|
"mode": "strict"
|
|
|
|
}],
|
|
|
|
"keyword-spacing": "warn",
|
2020-12-15 14:25:01 +01:00
|
|
|
"linebreak-style": ["error", "unix"],
|
2021-08-23 16:10:22 +02:00
|
|
|
"max-len": ["warn", 250, {
|
|
|
|
"ignoreStrings": true,
|
|
|
|
"ignoreTemplateLiterals": true
|
|
|
|
}],
|
|
|
|
"max-params": ["warn", {
|
|
|
|
"max": 5
|
|
|
|
}],
|
|
|
|
"max-statements-per-line": ["error", {
|
|
|
|
"max": 1
|
|
|
|
}],
|
|
|
|
"multiline-ternary": ["warn", "always-multiline"],
|
2020-12-15 14:25:01 +01:00
|
|
|
"new-cap": "warn",
|
2021-08-23 16:10:22 +02:00
|
|
|
"new-parens": ["error", "always"],
|
|
|
|
"no-duplicate-imports": "error",
|
|
|
|
"no-empty-pattern": "error",
|
|
|
|
"no-lonely-if": "warn",
|
|
|
|
"no-multi-assign": "error",
|
|
|
|
"no-multi-spaces": "warn",
|
|
|
|
"no-multi-str": "warn",
|
|
|
|
"no-multiple-empty-lines": "error",
|
|
|
|
"no-new": "warn",
|
|
|
|
"no-new-object": "error",
|
|
|
|
"no-new-wrappers": "error",
|
|
|
|
"no-return-assign": "error",
|
|
|
|
"no-self-compare": "warn",
|
|
|
|
"no-sequences": "error",
|
2020-12-15 14:25:01 +01:00
|
|
|
"no-throw-literal": "error",
|
2021-08-23 16:10:22 +02:00
|
|
|
"no-trailing-spaces": ["warn", {
|
|
|
|
"skipBlankLines": true
|
|
|
|
}],
|
|
|
|
"no-unneeded-ternary": "warn",
|
|
|
|
"no-unreachable-loop": "warn",
|
|
|
|
"no-unused-vars": "warn",
|
|
|
|
"no-var": "error",
|
|
|
|
"object-curly-newline": ["warn", {
|
|
|
|
"consistent": true
|
|
|
|
}],
|
|
|
|
"object-curly-spacing": ["warn", "always", {
|
|
|
|
"arraysInObjects": false,
|
|
|
|
"objectsInObjects": true
|
|
|
|
}],
|
|
|
|
"object-property-newline": ["warn", {
|
|
|
|
"allowAllPropertiesOnSameLine": true
|
|
|
|
}],
|
|
|
|
"object-shorthand": ["warn", "properties"],
|
|
|
|
"one-var": ["warn", "never"],
|
|
|
|
"operator-linebreak": ["warn", "before"],
|
|
|
|
"padded-blocks": ["warn", "never"],
|
|
|
|
"prefer-arrow-callback": "warn",
|
|
|
|
"prefer-const": ["warn", {
|
|
|
|
"destructuring": "all"
|
|
|
|
}],
|
|
|
|
"prefer-exponentiation-operator": "warn",
|
|
|
|
"prefer-numeric-literals": "warn",
|
|
|
|
"prefer-object-spread": "warn",
|
|
|
|
"prefer-rest-params": "error",
|
|
|
|
"prefer-template": "warn",
|
|
|
|
"quote-props": ["warn", "as-needed"],
|
|
|
|
"quotes": ["error", "single"],
|
|
|
|
"rest-spread-spacing": ["warn", "never"],
|
|
|
|
"semi": ["error", "always"],
|
|
|
|
"semi-spacing": ["warn", {
|
|
|
|
"before": false,
|
|
|
|
"after": true
|
|
|
|
}],
|
|
|
|
"semi-style": ["warn", "last"],
|
|
|
|
"space-before-blocks": ["warn", "always"],
|
|
|
|
"space-before-function-paren": ["warn", "always"],
|
|
|
|
"space-in-parens": ["warn", "never"],
|
|
|
|
"space-infix-ops": "error",
|
|
|
|
"space-unary-ops": "warn",
|
|
|
|
"spaced-comment": ["warn", "always"],
|
|
|
|
"switch-colon-spacing": "warn",
|
|
|
|
"template-curly-spacing": ["warn", "never"],
|
|
|
|
"template-tag-spacing": ["warn", "always"],
|
|
|
|
"unicorn/catch-error-name": ["warn", {
|
|
|
|
"name": "e"
|
|
|
|
}],
|
|
|
|
"unicorn/empty-brace-spaces": "warn",
|
|
|
|
"unicorn/no-array-for-each": "error",
|
|
|
|
"unicorn/no-array-push-push": "warn",
|
|
|
|
"unicorn/no-console-spaces": "warn",
|
|
|
|
"unicorn/no-for-loop": "warn",
|
|
|
|
"unicorn/no-lonely-if": "warn",
|
|
|
|
"unicorn/no-instanceof-array": "error",
|
|
|
|
"unicorn/no-nested-ternary": "warn",
|
|
|
|
"unicorn/no-new-buffer": "error",
|
|
|
|
"unicorn/no-unreadable-array-destructuring": "error",
|
|
|
|
"unicorn/number-literal-case": "warn",
|
|
|
|
"unicorn/numeric-separators-style": ["warn", {
|
|
|
|
"onlyIfContainsSeparator": true
|
|
|
|
}],
|
|
|
|
"unicorn/prefer-array-find": "warn",
|
|
|
|
"unicorn/prefer-array-flat": "warn",
|
|
|
|
"unicorn/prefer-array-flat-map": "warn",
|
|
|
|
"unicorn/prefer-array-index-of": "warn",
|
|
|
|
"unicorn/prefer-array-some": "warn",
|
|
|
|
"unicorn/prefer-regexp-test": "warn",
|
|
|
|
"unicorn/prefer-date-now": "warn",
|
|
|
|
"unicorn/prefer-includes": "warn",
|
|
|
|
"unicorn/prefer-math-trunc": "warn",
|
|
|
|
"unicorn/prefer-string-starts-ends-with": "warn",
|
|
|
|
"unicorn/prefer-string-trim-start-end": "warn",
|
|
|
|
"unicorn/throw-new-error": "error",
|
|
|
|
"wrap-iife": ["warn", "inside"],
|
|
|
|
"yoda": "error"
|
2020-12-15 14:25:01 +01:00
|
|
|
}
|
|
|
|
}
|