-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy patheslint.config.mjs
39 lines (37 loc) · 1.01 KB
/
eslint.config.mjs
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
// @ts-check
import pluginVue from 'eslint-plugin-vue'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import oxlint from 'eslint-plugin-oxlint'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
export default [
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue,js,cjs,mjs,jsx}']
},
{
name: 'app/files-to-ignore',
ignores: ['auto-imports.d.ts', 'components.d.ts', '.output/*', '.wxt/*']
},
...pluginVue.configs['flat/essential'],
...vueTsEslintConfig(),
{
name: 'app/overrides',
rules: {
'no-var': 'error',
'@typescript-eslint/no-unused-vars': 'warn',
'prefer-const': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'vue/multi-word-component-names': 'off'
}
},
{
name: 'app/overrides-js',
files: ['**/*.js', '**/*.cjs', '**/*.mjs', '**/*.cjx'],
rules: {
'@typescript-eslint/no-var-requires': 'off'
}
},
oxlint.configs['flat/recommended'],
skipFormatting
]