-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.ts
More file actions
75 lines (74 loc) · 1.88 KB
/
eslint.config.ts
File metadata and controls
75 lines (74 loc) · 1.88 KB
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
73
74
75
import antfu from '@antfu/eslint-config'
export default antfu(
{
vue: true,
typescript: true,
formatters: false,
},
{
rules: {
'style/brace-style': ['error', '1tbs'],
'style/arrow-parens': ['error', 'always'],
'style/quotes': ['error', 'single', { avoidEscape: true }],
'style/member-delimiter-style': [
'error',
{ multiline: { delimiter: 'none' }, singleline: { delimiter: 'semi' } },
],
'antfu/if-newline': 'off',
'no-console': 'warn',
'ts/no-explicit-any': 'error',
'ts/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
allowHigherOrderFunctions: true,
},
],
'ts/consistent-type-assertions': [
'warn',
{
assertionStyle: 'never',
},
],
},
},
{
files: ['**/*.vue'],
rules: {
'vue/define-emits-declaration': 'error',
'vue/define-props-declaration': 'error',
'vue/no-required-prop-with-default': 'error',
'vue/require-prop-types': 'error',
'vue/singleline-html-element-content-newline': 'off',
'vue/html-closing-bracket-newline': 'off',
'vue/html-indent': 'off',
'vue/html-self-closing': [
'error',
{
html: { void: 'any', normal: 'always', component: 'always' },
svg: 'always',
math: 'always',
},
],
'vue/max-len': [
'error',
{
code: 120,
template: 120,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreHTMLAttributeValues: true,
},
],
},
},
{
files: ['**/*.test.ts', '**/*.spec.ts', '**/e2e/**'],
rules: {
'ts/no-explicit-any': 'off',
'ts/explicit-function-return-type': 'off',
},
},
)