-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.js
67 lines (66 loc) · 1.62 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
58
59
60
61
62
63
64
65
66
67
import antfu from '@antfu/eslint-config';
import pluginSecurity from 'eslint-plugin-security';
import vueParse from 'vue-eslint-parser';
export default antfu({
typescript: true,
vue: {
overrides: {
'vue/multi-word-component-names': [0],
'vue/max-attributes-per-line': ['error', {
singleline: {
max: 3,
},
multiline: {
max: 1,
},
}],
'vue/html-self-closing': [0, {
html: {
void: 'never',
normal: 'always',
component: 'always',
},
svg: 'always',
math: 'always',
}],
'vue/html-indent': ['error', 2, {
attribute: 1,
baseIndent: 1,
closeBracket: 0,
alignAttributesVertically: true,
ignores: [],
}],
},
},
}, [
{
ignores: ['public/**/*'],
},
pluginSecurity.configs.recommended,
{
rules: {
'curly': ['error', 'all'],
'style/brace-style': 'error',
'style/multiline-ternary': ['error', 'always'],
'unused-imports/no-unused-imports': 'off',
'unused-imports/no-unused-vars': [
'warn',
{ args: 'after-used', argsIgnorePattern: '^_', vars: 'all', varsIgnorePattern: '^_' },
],
'no-console': ['warn'],
'style/semi': ['error', 'always'],
'style/indent': ['error', 2, { SwitchCase: 1 }],
'style/max-len': [
'error',
{
code: 120,
tabWidth: 2,
ignoreRegExpLiterals: true,
ignoreUrls: true,
},
],
'comma-dangle': ['error', 'always-multiline'],
'style/quotes': ['error', 'single'],
},
},
]);