forked from vitest-dev/eslint-plugin-vitest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
39 lines (37 loc) · 872 Bytes
/
eslint.config.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
34
35
36
37
38
39
import vitest from 'eslint-plugin-vitest'
import stylistic from '@stylistic/eslint-plugin'
import eslintPlugin from 'eslint-plugin-eslint-plugin'
import parser from '@typescript-eslint/parser'
const styleConfigs = stylistic.configs.customize({
indent: 2,
quotes: 'single',
semi: false,
jsx: true,
commaDangle: 'never'
})
export default [
eslintPlugin.configs['flat/recommended'],
{
files: ['**/*.ts', '**/*.js'], // or any other pattern
plugins: {
vitest,
'@stylistic': stylistic
},
rules: {
...styleConfigs.rules,
...vitest.configs.recommended.rules,
'eslint-plugin/require-meta-docs-description': 'error'
},
settings: {
vitest: {
typecheck: true
}
},
languageOptions: {
parser: parser,
globals: {
...vitest.environments.env.globals
}
}
}
]