-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy path.eslintrc.js
53 lines (50 loc) · 1.2 KB
/
.eslintrc.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
module.exports = {
root: true,
env: {
node: true,
},
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/prettier', '@vue/typescript'],
parserOptions: {
parser: '@typescript-eslint/parser',
},
globals: {
wx: 'readonly',
},
rules: {
'prettier/prettier': [
'error',
{
tabWidth: 2,
singleQuote: true,
semi: false,
trailingComma: 'es5',
arrowParens: 'always',
endOfLine: 'auto',
printWidth: 100,
},
],
'no-debugger': 'error',
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'never',
functions: 'never',
},
],
'vue/no-use-v-if-with-v-for': [
'error',
{
allowUsingIterationVar: true,
},
],
'@typescript-eslint/no-explicit-any': ['error'], //禁止使用any
eqeqeq: 2, //必须使用全等
'max-lines': ['error', 500], //限制行数 请勿修改 请优化你的代码
complexity: ['error', 5], // 限制复杂度
'require-await': 'error',
},
}
//可以添加规则 禁止删除忽略规则 请严格执行