-
Notifications
You must be signed in to change notification settings - Fork 16
/
.eslintrc.cjs
99 lines (93 loc) · 2.64 KB
/
.eslintrc.cjs
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-recommended',
'eslint:recommended',
'standard',
'@vue/eslint-config-typescript/recommended',
'./.eslintrc-auto-import.json'
],
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser'
},
ignorePatterns: ['dts/*.d.ts', 'src/api/types/schema.d.ts', 'src/api/types/axios.d.ts'],
rules: {
'max-len': ['error', {
code: 120,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreRegExpLiterals: true,
ignorePattern: 'url\\('
}],
'no-undef': 'off',
'no-prototype-builtins': 'off',
'array-callback-return': 'off',
'vue/max-attributes-per-line': 'off',
'vue/require-default-prop': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/no-v-html': 'off',
'vue/multi-word-component-names': 'off',
'vue/v-slot-style': ['error', {
atComponent: 'shorthand',
default: 'shorthand',
named: 'shorthand'
}],
'vue/valid-attribute-name': 'off',
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
'vue/script-setup-uses-vars': 'error',
'vue/attribute-hyphenation': 'off',
'vue/v-on-event-hyphenation': 'off',
'vue/first-attribute-linebreak': ['error', {
singleline: 'ignore',
multiline: 'below'
}],
'vue/custom-event-name-casing': 'off',
'func-call-spacing': 'off',
'@typescript-eslint/func-call-spacing': ['error', 'never'],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
'@typescript-eslint/explicit-module-boundary-types': 'off',
indent: 'off',
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/type-annotation-spacing': ['error', {
before: false,
after: true,
overrides: { arrow: { before: true, after: true } }
}],
'@typescript-eslint/member-delimiter-style': ['error',
{
multiline: {
delimiter: 'none',
requireLast: false
},
singleline: {
delimiter: 'semi',
requireLast: false
}
}
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
prefix: ['I']
},
{
selector: 'typeAlias',
format: ['PascalCase'],
prefix: ['T']
},
{
selector: 'enum',
format: ['PascalCase'],
prefix: ['E']
}
]
}
}