-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
52 lines (51 loc) · 1.29 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
import process from 'node:process';
import antfu from '@antfu/eslint-config';
export default antfu(
{
// TypeScript and Vue are autodetected, you can also explicitly enable them:
typescript: true,
vue: true,
ignores: [
'dist/*',
'node_modules/*',
'*.d.ts',
],
},
{
rules: {
'vue/html-self-closing': ['error', {
html: {
void: 'always',
normal: 'never',
component: 'always',
},
svg: 'always',
math: 'always',
}],
'style/semi': [2, 'always'],
'vue/max-attributes-per-line': [1, {
singleline: 3,
multiline: 1,
}],
'curly': [2, 'all'],
'style/brace-style': [2, '1tbs', { allowSingleLine: true }],
'max-statements-per-line': [2, { max: 2 }],
'unused-imports/no-unused-vars': ['error', {
caughtErrors: 'none',
}],
'no-console': process.env.NODE_ENV === 'production' ? 2 : 1,
'style/member-delimiter-style': [2, {
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
multilineDetection: 'brackets',
}],
'style/max-statements-per-line': ['error', { max: 3 }],
},
},
);