|
11 | 11 | "jsdoc", |
12 | 12 | "jsx-a11y", |
13 | 13 | "node", |
14 | | - "promise" |
| 14 | + "promise", |
| 15 | + "vitest" |
15 | 16 | ], |
16 | 17 | "categories": { |
17 | 18 | "correctness": "error", |
|
58 | 59 | "no-proto": "error", |
59 | 60 | "no-regex-spaces": "warn", |
60 | 61 | "no-sequences": "error", |
61 | | - "no-unused-vars": ["error", { "ignoreRestSiblings": true }], |
| 62 | + "no-unused-vars": [ |
| 63 | + "error", |
| 64 | + { |
| 65 | + "ignoreRestSiblings": true, |
| 66 | + "argsIgnorePattern": "^_", |
| 67 | + "varsIgnorePattern": "^_", |
| 68 | + "caughtErrorsIgnorePattern": "^_" |
| 69 | + } |
| 70 | + ], |
62 | 71 | "no-var": "error", |
63 | 72 | "no-void": "warn", |
64 | 73 | "prefer-const": "error", |
|
94 | 103 | "@typescript-eslint/strict-boolean-expressions": "off", |
95 | 104 | "capitalized-comments": "off", |
96 | 105 | "id-length": "off", |
| 106 | + "init-declarations": "off", |
97 | 107 | "import/exports-last": "off", |
98 | 108 | "import/group-exports": "off", |
99 | 109 | "import/no-named-export": "off", |
|
122 | 132 | "react-perf/jsx-no-new-function-as-prop": "off", |
123 | 133 | "sort-imports": "off", |
124 | 134 | "sort-keys": "off", |
125 | | - "unicorn/no-null": "off" |
| 135 | + "unicorn/no-null": "off", |
| 136 | + |
| 137 | + "vitest/consistent-test-it": [ |
| 138 | + "error", |
| 139 | + { "fn": "test", "withinDescribe": "test" } |
| 140 | + ], |
| 141 | + "vitest/max-expects": "off", |
| 142 | + "vitest/no-conditional-in-test": "off", |
| 143 | + "vitest/no-hooks": "off", |
| 144 | + "vitest/no-importing-vitest-globals": "off", |
| 145 | + "vitest/no-standalone-expect": "off", |
| 146 | + "vitest/prefer-called-times": "off", |
| 147 | + "vitest/prefer-called-with": "off", |
| 148 | + "vitest/prefer-expect-assertions": "off", |
| 149 | + "vitest/prefer-lowercase-title": "off", |
| 150 | + "vitest/prefer-strict-boolean-matchers": "off", |
| 151 | + "vitest/prefer-to-be": "off", |
| 152 | + "vitest/prefer-to-be-falsy": "off", |
| 153 | + "vitest/prefer-to-be-truthy": "off", |
| 154 | + "vitest/require-hook": "off", |
| 155 | + "vitest/require-mock-type-parameters": "off" |
126 | 156 | }, |
127 | 157 | "overrides": [ |
128 | 158 | { |
|
133 | 163 | "@typescript-eslint/no-unsafe-call": "off", |
134 | 164 | "@typescript-eslint/no-unsafe-return": "off" |
135 | 165 | } |
| 166 | + }, |
| 167 | + { |
| 168 | + "files": ["src/tests/**/*.{ts,tsx}"], |
| 169 | + "rules": { |
| 170 | + // ─── TS strictness relaxed for spy/mock-style test code ─── |
| 171 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 172 | + "@typescript-eslint/no-useless-default-assignment": "off", |
| 173 | + |
| 174 | + // ─── General style/correctness rules tests legitimately break ─── |
| 175 | + "no-console": "off", |
| 176 | + "no-param-reassign": "off", |
| 177 | + "no-underscore-dangle": "off", |
| 178 | + |
| 179 | + // ─── JSX/a11y/perf rules not applicable to test fixtures ─── |
| 180 | + "jsx-a11y/no-autofocus": "off", |
| 181 | + "react-perf/jsx-no-new-array-as-prop": "off", |
| 182 | + "react-perf/jsx-no-new-object-as-prop": "off", |
| 183 | + |
| 184 | + // ─── Unicorn opinions that don't fit test patterns ─── |
| 185 | + "unicorn/consistent-function-scoping": "off", |
| 186 | + "unicorn/prefer-at": "off", |
| 187 | + "unicorn/prefer-global-this": "off" |
| 188 | + } |
136 | 189 | } |
137 | 190 | ] |
138 | 191 | } |
0 commit comments