-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
48 lines (48 loc) · 1.49 KB
/
.eslintrc.cjs
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* eslint-env node */
module.exports = {
root: true,
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/strict-type-checked',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
overrides: [
{
files: '**/*.test.ts',
plugins: ['vitest'],
extends: ['plugin:vitest/recommended', 'prettier'],
rules: {
'vitest/require-top-level-describe': 'error',
'vitest/require-to-throw-message': 'error',
'vitest/require-hook': 'error',
'vitest/prefer-to-have-length': 'error',
'vitest/prefer-to-contain': 'error',
'vitest/prefer-to-be-object': 'error',
'vitest/prefer-strict-equal': 'error',
'vitest/prefer-mock-promise-shorthand': 'error',
'vitest/prefer-lowercase-title': 'error',
'vitest/prefer-hooks-on-top': 'error',
'vitest/prefer-hooks-in-order': 'error',
'vitest/prefer-expect-resolves': 'error',
'vitest/prefer-equality-matcher': 'error',
'vitest/prefer-each': 'error',
'vitest/prefer-comparison-matcher': 'error',
'vitest/no-test-return-statement': 'error',
'vitest/no-standalone-expect': 'error',
'vitest/no-test-prefixes': 'error',
'vitest/no-interpolation-in-snapshots': 'error',
'vitest/no-done-callback': 'error',
'vitest/no-conditional-tests': 'error',
'vitest/no-conditional-expect': 'error',
'vitest/consistent-test-it': 'error',
'vitest/consistent-test-filename': 'error',
},
},
],
};