UNPKG

@addon24/eslint-config

Version:

ESLint configuration rules for WorldOfTextcraft projects - Centralized configuration for all project types

156 lines (152 loc) 6.26 kB
export default { rules: { // Kritische Regex Performance - nur funktionierende Regeln "regexp/confusing-quantifier": "error", "regexp/control-character-escape": "error", "regexp/negation": "error", "regexp/no-dupe-characters-character-class": "error", "regexp/no-dupe-disjunctions": "error", "regexp/no-empty-alternative": "error", "regexp/no-empty-capturing-group": "error", "regexp/no-empty-character-class": "error", "regexp/no-empty-group": "error", "regexp/no-empty-lookarounds-assertion": "error", "regexp/no-escape-backspace": "error", "regexp/no-invalid-regexp": "error", "regexp/no-lazy-ends": "error", "regexp/no-misleading-capturing-group": "error", "regexp/no-misleading-unicode-character": "error", "regexp/no-missing-g-flag": "error", "regexp/no-potentially-useless-backreference": "error", "regexp/no-super-linear-backtracking": "error", "regexp/no-super-linear-move": "error", "regexp/no-trivially-nested-assertion": "error", "regexp/no-trivially-nested-quantifier": "error", "regexp/no-unused-capturing-group": "error", "regexp/no-useless-assertions": "error", "regexp/no-useless-backreference": "error", "regexp/no-useless-character-class": "error", "regexp/no-useless-dollar-replacements": "error", "regexp/no-useless-escape": "error", "regexp/no-useless-flag": "error", "regexp/no-useless-lazy": "error", "regexp/no-useless-quantifier": "error", "regexp/no-useless-range": "error", "regexp/no-useless-two-nums-quantifier": "error", "regexp/no-zero-quantifier": "error", "regexp/optimal-lookaround-quantifier": "error", "regexp/optimal-quantifier-concatenation": "error", "regexp/prefer-lookaround": "error", "regexp/prefer-named-backreference": "error", "regexp/prefer-named-capture-group": "error", "regexp/prefer-named-replacement": "error", "regexp/prefer-plus-quantifier": "error", "regexp/prefer-predefined-assertion": "error", "regexp/prefer-quantifier": "error", "regexp/prefer-range": "error", "regexp/prefer-regexp-exec": "error", "regexp/prefer-regexp-test": "error", "regexp/prefer-result-array-groups": "error", "regexp/prefer-set-operation": "error", "regexp/prefer-star-quantifier": "error", "regexp/prefer-unicode-codepoint-escapes": "error", "regexp/require-unicode-regexp": "error", "regexp/simplify-set-operations": "error", "regexp/sort-alternatives": "error", "regexp/sort-character-class-elements": "error", "regexp/sort-flags": "error", "regexp/strict": "error", "regexp/use-ignore-case": "error", // Performance-kritische Standard-Regeln "no-await-in-loop": "error", "no-constant-binary-expression": "error", "no-unreachable-loop": "error", "prefer-const": "error", "no-var": "error", "prefer-template": "error", "prefer-spread": "error", "prefer-rest-params": "error", "prefer-arrow-callback": ["error", { "allowNamedFunctions": false, "allowUnboundThis": true }], "object-shorthand": "error", "prefer-destructuring": ["error", { "VariableDeclarator": { "array": false, "object": true }, "AssignmentExpression": { "array": true, "object": false } }], // Memory-Management "no-implied-eval": "error", "no-new-func": "error", "no-new-object": "error", "no-new-wrappers": "error", "no-array-constructor": "error", // Kritische Unicorn-Regeln (nur funktionierende) "unicorn/better-regex": "error", "unicorn/catch-error-name": "error", "unicorn/error-message": "error", "unicorn/escape-case": "error", "unicorn/explicit-length-check": "error", "unicorn/new-for-builtins": "error", "unicorn/no-abusive-eslint-disable": "error", "unicorn/no-console-spaces": "error", "unicorn/no-empty-file": "error", "unicorn/no-hex-escape": "error", "unicorn/no-instanceof-array": "error", "unicorn/no-new-array": "error", "unicorn/no-new-buffer": "error", "unicorn/no-process-exit": "error", "unicorn/no-static-only-class": "error", "unicorn/no-this-assignment": "error", "unicorn/no-typeof-undefined": "error", "unicorn/no-unnecessary-await": "error", "unicorn/no-useless-length-check": "error", "unicorn/no-useless-spread": "error", "unicorn/no-zero-fractions": "error", "unicorn/number-literal-case": "error", "unicorn/prefer-array-find": "error", "unicorn/prefer-array-flat": "error", "unicorn/prefer-array-flat-map": "error", "unicorn/prefer-array-index-of": "error", "unicorn/prefer-array-some": "error", "unicorn/prefer-at": "error", "unicorn/prefer-code-point": "error", "unicorn/prefer-date-now": "error", "unicorn/prefer-default-parameters": "error", "unicorn/prefer-includes": "error", "unicorn/prefer-json-parse-buffer": "error", "unicorn/prefer-logical-operator-over-ternary": "error", "unicorn/prefer-math-trunc": "error", "unicorn/prefer-modern-math-apis": "error", "unicorn/prefer-module": "error", "unicorn/prefer-native-coercion-functions": "error", "unicorn/prefer-negative-index": "error", "unicorn/prefer-node-protocol": "error", "unicorn/prefer-number-properties": "error", "unicorn/prefer-object-from-entries": "error", "unicorn/prefer-optional-catch-binding": "error", "unicorn/prefer-prototype-methods": "error", "unicorn/prefer-reflect-apply": "error", "unicorn/prefer-regexp-test": "error", "unicorn/prefer-set-has": "error", "unicorn/prefer-set-size": "error", "unicorn/prefer-string-replace-all": "error", "unicorn/prefer-string-slice": "error", "unicorn/prefer-string-starts-ends-with": "error", "unicorn/prefer-string-trim-start-end": "error", "unicorn/prefer-switch": "error", "unicorn/prefer-ternary": "error", "unicorn/prefer-top-level-await": "error", "unicorn/prefer-type-error": "error", "unicorn/require-array-join-separator": "error", "unicorn/require-number-to-fixed-digits-argument": "error", "unicorn/switch-case-braces": "error", "unicorn/throw-new-error": "error", }, };