Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
66 lines (58 loc) · 1.48 KB
/
Copy patheslint.config.js
File metadata and controls
66 lines (58 loc) · 1.48 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import tseslint from 'typescript-eslint'
import pluginVue from 'eslint-plugin-vue'
import prettierConfig from 'eslint-config-prettier'
export default tseslint.config(
{
ignores: [
'**/dist/**',
'**/.vite-ssg-temp/**',
'**/node_modules/**',
'**/public/**',
'src/env.d.ts'
]
},
tseslint.configs.base,
...tseslint.configs.recommended.map((config) => ({
...config,
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx']
})),
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {
// `src/types.ts` and `src/interfaces.ts` are type-only modules reached
// from paths with no bundler (the Vite config and `tsx` for the sitemap),
// so a type import must never survive as a runtime one.
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' }
],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }
]
}
},
...pluginVue.configs['flat/recommended'],
{
files: ['**/*.vue'],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
extraFileExtensions: ['.vue'],
sourceType: 'module'
}
}
},
{
rules: {
'vue/no-v-html': [
'error',
{
ignorePattern: '^sanitized'
}
]
}
},
prettierConfig
)