-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
57 lines (55 loc) · 1.27 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import js from '@eslint/js'
import eslintPluginVue from 'eslint-plugin-vue'
import ts from 'typescript-eslint'
import stylistic from '@stylistic/eslint-plugin'
import pluginVueA11y from 'eslint-plugin-vuejs-accessibility'
export default ts.config(
// Parser
{
files: ['*.vue', '**/*.vue'],
languageOptions: {
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
},
},
// Base config
js.configs.recommended,
...ts.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
...pluginVueA11y.configs['flat/recommended'],
stylistic.configs.customize({
indent: 'tab',
quotes: 'single',
semi: false,
jsx: false,
}),
// Overrides
{
// Vue Overrides
files: ['*.vue', '**/*.vue'],
rules: {
'vue/block-order': [
'error',
{
order: [
'script:not([setup])',
'script[setup]',
'template',
'style[scoped]',
'style:not([scoped])',
],
},
],
'vue/multi-word-component-names': 0,
'vue/script-indent': ['error', 'tab', { baseIndent: 1 }],
'vue/html-indent': ['error', 'tab'],
'vue/html-comment-indent': ['error', 'tab'],
'vue/no-v-html': 0,
'@stylistic/indent': 0,
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-explicit-any': 0,
},
},
)