-
-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy patheslint.config.js
More file actions
34 lines (33 loc) · 1023 Bytes
/
Copy patheslint.config.js
File metadata and controls
34 lines (33 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import vitestPlugin from "eslint-plugin-vitest";
export default [
{
files: ["test/**/*.js"],
plugins: {
vitest: vitestPlugin,
},
rules: {
...vitestPlugin.configs.recommended.rules,
'vitest/prefer-expect-assertions': 'off',
'vitest/no-conditional-expect': 'off', // We use expect in try/catch blocks
'vitest/expect-expect': 'off', // We use expect.rejects and expect.resolves
'vitest/valid-title': 'warn', // Allow duplicate prefixes in nested describes
'vitest/no-disabled-tests': 'warn',
'vitest/no-focused-tests': 'error',
'vitest/no-identical-title': 'error',
'vitest/valid-expect': 'error'
},
languageOptions: {
globals: {
...vitestPlugin.environments.env.globals,
describe: 'readonly',
it: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
vi: 'readonly',
},
},
}
];