-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.tests.js
33 lines (32 loc) · 1.08 KB
/
.eslintrc.tests.js
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
// eslint-disable-next-line import/no-extraneous-dependencies
const vitest = require('eslint-plugin-vitest');
module.exports = {
overrides: [
{
files: [
'**/*.spec.js',
'**/*.spec.ts',
],
plugins: ['vitest'],
extends: [
'plugin:vitest/recommended',
],
globals: {
...vitest.environments.env.globals,
},
rules: {
'vitest/consistent-test-filename': ['error', { pattern: '.*\\.spec\\.[tj]sx?$' }],
'vitest/consistent-test-it': ['error', { fn: 'it', withinDescribe: 'it' }],
'vitest/no-alias-methods': 'error',
'vitest/no-disabled-tests': 'error',
'vitest/no-duplicate-hooks': 'error',
'vitest/no-focused-tests': 'error',
'vitest/no-standalone-expect': ['error', { additionalTestBlockFunctions: ['beforeEach', 'afterEach'] }],
'vitest/prefer-hooks-in-order': 'error',
'vitest/prefer-hooks-on-top': 'error',
'vitest/prefer-lowercase-title': ['error', { ignoreTopLevelDescribe: true }],
'vitest/prefer-to-be': 'off',
},
},
],
};