-
Notifications
You must be signed in to change notification settings - Fork 6
/
eslint.config.js
53 lines (52 loc) · 1.57 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
import antfu from '@antfu/eslint-config'
export default antfu(
{ vue: true, typescript: true },
{
// Remember to specify the file glob here, otherwise it might cause the vue plugin to handle non-vue files
files: ['**/*.vue'],
rules: {
'vue/no-unused-components': 'warn',
'vue/no-unused-vars': 'warn',
'vue/no-multi-spaces': 'error',
'vue/html-self-closing': 'off',
'vue/no-v-html': 'off',
'vue/mustache-interpolation-spacing': 'error',
'vue/max-attributes-per-line': ['warn', {
singleline: {
max: 1,
},
multiline: {
max: 1,
},
}],
'vue/first-attribute-linebreak': ['warn', {
singleline: 'beside',
multiline: 'below',
}],
'vue/html-closing-bracket-spacing': ['error', {
startTag: 'never',
endTag: 'never',
selfClosingTag: 'always',
}],
'vue/component-name-in-template-casing': 'off',
},
},
{
// Without `files`, they are general rules for all files
rules: {
'curly': ['error', 'multi-line'],
'prefer-const': 'warn',
'no-console': 'off',
'no-debugger': 'off',
'no-alert': 'off',
'no-prototype-builtins': 'off',
'no-unused-vars': 'off',
'unused-imports/no-unused-vars': 'warn',
'node/prefer-global/process': 'off',
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'style/brace-style': ['error', '1tbs', { allowSingleLine: true }],
'ts/no-unused-vars': 'warn',
'style/arrow-parens': ['error', 'always'],
},
},
)