massbanner/.eslintrc.json

134 lines
4.7 KiB
JSON

{
"env": {
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"plugins": [
"unicorn"
],
"rules": {
"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",
"indent": ["warn", 4],
"key-spacing": ["warn", {
"afterColon": true,
"beforeColon": false,
"mode": "strict"
}],
"keyword-spacing": "warn",
"linebreak-style": ["error", "unix"],
"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"],
"new-cap": "warn",
"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",
"no-throw-literal": "error",
"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"
}
}