-
Notifications
You must be signed in to change notification settings - Fork 49
/
.eslintrc.cjs
131 lines (131 loc) · 3.61 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
module.exports = {
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
tsx: true,
jsx: true
}
},
extends: ['plugin:vue/vue3-recommended', 'plugin:@typescript-eslint/recommended'],
rules: {
camelcase: 0,
semi: 'off',
indent: 'off',
quotes: 'off',
eqeqeq: ['error', 'always'],
'no-param-reassign': 'off',
'max-len': 'off',
'vue/max-attributes-per-line': 0,
'no-angle-bracket-type-assertion': 0,
'no-var-requires': 0,
'no-return-await': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-angle-bracket-type-assertion': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'import/no-webpack-loader-syntax': 0,
// 设置默认eslint规则
'one-var': 0,
'arrow-parens': 0,
'generator-star-spacing': 0,
'no-debugger': 0,
'no-console': 0,
'no-extra-semi': 2,
'space-before-function-paren': 0,
'no-useless-escape': 0,
'no-tabs': 0,
'no-mixed-spaces-and-tabs': 0,
'new-cap': 0,
'no-new': 0,
'prefer-const': 0,
'vue/no-v-html': 0,
'lines-between-class-members': 0,
'no-unused-expressions': 0,
'no-unused-vars': 0,
'object-curly-spacing': ['error', 'always'],
'vue/singleline-html-element-content-newline': 0,
'no-trailing-spaces': ['error', {}],
'spaced-comment': ['error'],
'no-multi-spaces': ['error'],
'object-shorthand': ['error', 'always'],
'no-multiple-empty-lines': [
'error',
{
max: 1,
maxEOF: 1,
maxBOF: 0
}
],
'func-call-spacing': 'off',
'brace-style': 'off',
'comma-dangle': ['error', 'never'],
'comma-spacing': 'off',
'@typescript-eslint/quotes': ['error', 'single', { allowTemplateLiterals: true }],
'@typescript-eslint/comma-spacing': ['error', { before: false, after: true }],
'@typescript-eslint/comma-dangle': ['error', 'never'],
'@typescript-eslint/brace-style': ['error', '1tbs'],
'@typescript-eslint/func-call-spacing': ['error', 'never'],
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^h$'
}
],
'eslint@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-this-alias': 0,
'@typescript-eslint/no-inferrable-types': 0,
'@typescript-eslint/semi': ['error'],
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'semi',
requireLast: true
},
singleline: {
delimiter: 'semi',
requireLast: false
},
multilineDetection: 'brackets'
}
],
'@typescript-eslint/explicit-member-accessibility': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/member-ordering': [
2,
{
default: [
'constructor',
'private-field',
'protected-field',
'public-field',
'field',
'private-method',
'protected-method',
'public-method',
'method'
]
}
],
'vue/valid-template-root': 'off',
'vue/multi-word-component-names': 'off',
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'never',
component: 'always'
},
svg: 'always',
math: 'always'
}
]
}
};