-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
72 lines (67 loc) · 1.77 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
68
69
70
71
72
import antfu from '@antfu/eslint-config';
export default antfu({
vue: true,
rules: {
'no-console': 'warn',
'curly': ['error', 'all'],
'camelcase': 'error',
'no-useless-constructor': 'error',
'no-control-regex': 'error',
'antfu/top-level-function': 'off',
'node/prefer-global/process': ['error', 'always'],
'import/named': 'error',
'import/no-anonymous-default-export': ['error', {
allowCallExpression: true,
}],
'style/member-delimiter-style': 'error',
'style/semi': ['error', 'always'],
'style/quotes': ['error', 'single'],
'style/indent': ['error', 2],
'style/arrow-parens': ['error', 'always'],
'style/brace-style': ['error', '1tbs'],
'style/comma-dangle': ['error', 'always-multiline'],
'style/object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
'style/space-before-function-paren': [
'error',
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
},
],
'ts/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
// 'ts/consistent-type-imports': 'error',
'ts/array-type': [
'error',
{
default: 'array',
},
],
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
'vue/html-self-closing': ['error', {
html: {
normal: 'always',
void: 'always',
component: 'always',
},
}],
'vue/max-attributes-per-line': ['error', {
singleline: {
max: 3,
},
multiline: {
max: 1,
},
}],
'vue/component-tags-order': ['error', {
order: ['script', 'template', 'style'],
}],
},
});