|
| 1 | +{ |
| 2 | + "plugins": [ |
| 3 | + "eslint", |
| 4 | + "import", |
| 5 | + "node", |
| 6 | + "oxc", |
| 7 | + "promise", |
| 8 | + "typescript", |
| 9 | + "unicorn", |
| 10 | + "vitest" |
| 11 | + ], |
| 12 | + "categories": { |
| 13 | + "correctness": "error", |
| 14 | + "pedantic": "error", |
| 15 | + "perf": "error", |
| 16 | + "restriction": "error", |
| 17 | + "style": "error", |
| 18 | + "suspicious": "error" |
| 19 | + }, |
| 20 | + "env": { |
| 21 | + "node": true |
| 22 | + }, |
| 23 | + "settings": { |
| 24 | + "vitest": { |
| 25 | + "typecheck": true |
| 26 | + } |
| 27 | + }, |
| 28 | + "rules": { |
| 29 | + "eslint/accessor-pairs": ["error", { "enforceForClassMembers": true }], |
| 30 | + "eslint/array-callback-return": ["error", { "allowImplicit": true }], |
| 31 | + "eslint/arrow-body-style": "off", |
| 32 | + "eslint/capitalized-comments": "off", |
| 33 | + "eslint/func-names": "off", |
| 34 | + "eslint/func-style": [ |
| 35 | + "error", |
| 36 | + "declaration", |
| 37 | + { "allowArrowFunctions": true } |
| 38 | + ], |
| 39 | + "eslint/grouped-accessor-pairs": ["error", "getBeforeSet"], |
| 40 | + "eslint/id-length": "off", |
| 41 | + "eslint/init-declarations": "off", |
| 42 | + "eslint/max-lines": "off", |
| 43 | + "eslint/max-lines-per-function": "off", |
| 44 | + "eslint/max-params": "off", |
| 45 | + "eslint/max-statements": "off", |
| 46 | + "eslint/new-cap": "off", |
| 47 | + "eslint/no-await-in-loop": "off", |
| 48 | + "eslint/no-continue": "off", |
| 49 | + "eslint/no-duplicate-imports": "off", |
| 50 | + "eslint/no-else-return": ["error", { "allowElseIf": false }], |
| 51 | + "eslint/no-empty": ["error", { "allowEmptyCatch": true }], |
| 52 | + "eslint/no-magic-numbers": "off", |
| 53 | + "eslint/no-param-reassign": ["error", { "props": true }], |
| 54 | + "eslint/no-return-assign": ["error", "always"], |
| 55 | + "eslint/no-self-assign": ["error", { "props": true }], |
| 56 | + "eslint/no-ternary": "off", |
| 57 | + "eslint/no-undefined": "off", |
| 58 | + "eslint/no-unsafe-negation": [ |
| 59 | + "error", |
| 60 | + { "enforceForOrderingRelations": true } |
| 61 | + ], |
| 62 | + "eslint/no-unsafe-optional-chaining": [ |
| 63 | + "error", |
| 64 | + { "disallowArithmeticOperators": true } |
| 65 | + ], |
| 66 | + "eslint/no-unused-expressions": ["error", { "enforceForJSX": true }], |
| 67 | + "eslint/no-unused-vars": [ |
| 68 | + "error", |
| 69 | + { |
| 70 | + "argsIgnorePattern": "^_", |
| 71 | + "caughtErrorsIgnorePattern": "^_", |
| 72 | + "destructuredArrayIgnorePattern": "^_", |
| 73 | + "varsIgnorePattern": "^_" |
| 74 | + } |
| 75 | + ], |
| 76 | + "eslint/no-void": "off", |
| 77 | + "eslint/prefer-destructuring": [ |
| 78 | + "error", |
| 79 | + { "enforceForRenamedProperties": false } |
| 80 | + ], |
| 81 | + "eslint/prefer-promise-reject-errors": "off", |
| 82 | + "eslint/prefer-regex-literals": [ |
| 83 | + "error", |
| 84 | + { "disallowRedundantWrapping": true } |
| 85 | + ], |
| 86 | + "eslint/require-await": "off", |
| 87 | + "eslint/sort-imports": "off", |
| 88 | + "eslint/sort-keys": "off", |
| 89 | + "eslint/valid-typeof": ["error", { "requireStringLiterals": false }], |
| 90 | + "import/exports-last": "off", |
| 91 | + "import/group-exports": "off", |
| 92 | + "import/max-dependencies": "off", |
| 93 | + "import/no-default-export": "off", |
| 94 | + "import/no-named-export": "off", |
| 95 | + "import/no-namespace": "off", |
| 96 | + "import/no-unassigned-import": "error", |
| 97 | + "oxc/no-async-await": "off", |
| 98 | + "oxc/no-optional-chaining": "off", |
| 99 | + "oxc/no-rest-spread-properties": "off", |
| 100 | + "promise/avoid-new": "off", |
| 101 | + "promise/prefer-await-to-callbacks": "off", |
| 102 | + "typescript/array-type": [ |
| 103 | + "error", |
| 104 | + { |
| 105 | + "default": "array-simple", |
| 106 | + "readonly": "generic" |
| 107 | + } |
| 108 | + ], |
| 109 | + "typescript/ban-ts-comment": [ |
| 110 | + "error", |
| 111 | + { |
| 112 | + "ts-check": true, |
| 113 | + "ts-expect-error": false, |
| 114 | + "ts-ignore": true, |
| 115 | + "ts-nocheck": true |
| 116 | + } |
| 117 | + ], |
| 118 | + "typescript/consistent-type-definitions": ["error", "type"], |
| 119 | + "typescript/consistent-type-imports": [ |
| 120 | + "error", |
| 121 | + { |
| 122 | + "fixStyle": "separate-type-imports", |
| 123 | + "prefer": "type-imports" |
| 124 | + } |
| 125 | + ], |
| 126 | + "typescript/explicit-function-return-type": "off", |
| 127 | + "typescript/no-confusing-void-expression": [ |
| 128 | + "error", |
| 129 | + { "ignoreArrowShorthand": true } |
| 130 | + ], |
| 131 | + "typescript/no-misused-promises": [ |
| 132 | + "error", |
| 133 | + { "checksConditionals": true, "checksVoidReturn": false } |
| 134 | + ], |
| 135 | + "typescript/no-namespace": ["error", { "allowDeclarations": true }], |
| 136 | + "typescript/no-non-null-assertion": "off", |
| 137 | + "typescript/no-restricted-types": [ |
| 138 | + "error", |
| 139 | + { |
| 140 | + "types": { |
| 141 | + "[]": true, |
| 142 | + "null": true, |
| 143 | + "object": true |
| 144 | + } |
| 145 | + } |
| 146 | + ], |
| 147 | + "typescript/no-unsafe-type-assertion": "off", |
| 148 | + "typescript/only-throw-error": [ |
| 149 | + "error", |
| 150 | + { "allowThrowingAny": false, "allowThrowingUnknown": true } |
| 151 | + ], |
| 152 | + "typescript/prefer-nullish-coalescing": [ |
| 153 | + "error", |
| 154 | + { "ignoreConditionalTests": false } |
| 155 | + ], |
| 156 | + "typescript/prefer-promise-reject-errors": "off", |
| 157 | + "typescript/require-array-sort-compare": [ |
| 158 | + "error", |
| 159 | + { "ignoreStringArrays": true } |
| 160 | + ], |
| 161 | + "typescript/restrict-template-expressions": [ |
| 162 | + "error", |
| 163 | + { "allowNumber": true } |
| 164 | + ], |
| 165 | + "typescript/strict-boolean-expressions": "off", |
| 166 | + "typescript/switch-exhaustiveness-check": [ |
| 167 | + "error", |
| 168 | + { |
| 169 | + "allowDefaultCaseForExhaustiveSwitch": false, |
| 170 | + "requireDefaultForNonUnion": true |
| 171 | + } |
| 172 | + ], |
| 173 | + "typescript/unbound-method": "off", |
| 174 | + "unicorn/no-array-callback-reference": "off", |
| 175 | + "unicorn/no-null": "off", |
| 176 | + "unicorn/no-single-promise-in-promise-methods": "off", |
| 177 | + "unicorn/no-useless-undefined": "off", |
| 178 | + "unicorn/prefer-bigint-literals": "off" |
| 179 | + }, |
| 180 | + "overrides": [ |
| 181 | + { |
| 182 | + "files": ["*.d.ts"], |
| 183 | + "rules": { |
| 184 | + "import/no-unassigned-import": "off", |
| 185 | + "import/unambiguous": "off", |
| 186 | + "typescript/consistent-type-definitions": "off", |
| 187 | + "typescript/no-restricted-types": "off" |
| 188 | + } |
| 189 | + }, |
| 190 | + { |
| 191 | + "files": ["**/*.test.ts"], |
| 192 | + "rules": { |
| 193 | + "eslint/no-alert": "off", |
| 194 | + "promise/prefer-await-to-then": "off", |
| 195 | + "typescript/ban-ts-comment": "off", |
| 196 | + "typescript/no-confusing-void-expression": "off", |
| 197 | + "typescript/no-empty-function": "off", |
| 198 | + "typescript/no-extraneous-class": "off", |
| 199 | + "typescript/no-unsafe-assignment": "off", |
| 200 | + "typescript/no-unsafe-member-access": "off", |
| 201 | + "unicorn/consistent-function-scoping": "off", |
| 202 | + "vitest/no-conditional-tests": "off", |
| 203 | + "vitest/prefer-to-be-falsy": "off", |
| 204 | + "vitest/prefer-to-be-truthy": "off" |
| 205 | + } |
| 206 | + } |
| 207 | + ] |
| 208 | +} |
0 commit comments