-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
150 lines (150 loc) · 3.67 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
module.exports = {
'env': {
'browser': true,
'es2021': true
},
'extends': [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended'
],
'parser': 'vue-eslint-parser',
'parserOptions': {
'ecmaVersion': 12,
'parser': '@typescript-eslint/parser',
'sourceType': 'module'
},
'plugins': ['vue', '@typescript-eslint'],
'rules': {
'semi': ['error', 'always'],
'quotes': ['error', 'single'],
'spaced-comment': ['error', 'always'],
'block-spacing': 'error',
'brace-style': 'warn',
'space-before-blocks': 'error',
'arrow-spacing': 'error',
'keyword-spacing': [
'error',
{
'before': true,
'after': true
}
],
'switch-colon-spacing': [
'error',
{
before: true,
after: true
}
],
'no-multi-spaces': 'error',
'space-infix-ops': 'error',
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': ['error', 'never'],
'space-in-parens': ['error', 'never'],
'space-unary-ops': 'error',
'computed-property-spacing': ['error', 'never'],
'semi-spacing': [
'error',
{
before: false,
after: true
}
],
'key-spacing': [
'error',
{
beforeColon: false,
afterColon: true
}
],
'comma-spacing': [
'warn',
{
before: false,
after: true
}
],
'no-whitespace-before-property': 'error',
'no-console': process.env.NODE_ENV === 'production' ? 'off' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-unused-vars': 'off',
'no-dupe-keys': 'error',
'eqeqeq': 'warn',
'object-curly-newline': [
'warn',
{
'ObjectExpression': { 'multiline': true },
'ObjectPattern': { 'multiline': true },
'ImportDeclaration': 'never',
'ExportDeclaration': {
'multiline': true,
'minProperties': 3
}
}
],
'object-property-newline': 'error',
'array-element-newline': [
'error',
{
multiline: true,
minItems: 3
}
],
'array-bracket-newline': [
'warn',
{
multiline: true,
minItems: 3
}
],
'arrow-body-style': ['warn', 'as-needed'],
'implicit-arrow-linebreak': ['warn', 'beside'],
'no-sparse-arrays': 'error',
'indent': ['error', 2],
'func-call-spacing': ['error', 'never'],
'comma-dangle': ['warn', 'never'],
'no-prototype-builtins': 'warn',
'vue/multi-word-component-names': 'off',
'vue/no-useless-template-attributes': 'warn',
'vue/html-closing-bracket-newline': 'off',
'vue/block-tag-newline': [
'error',
{
singleline: 'always',
multiline: 'always',
maxEmptyLines: 1
}
],
'vue/attribute-hyphenation': ['error', 'always'],
'vue/v-on-event-hyphenation': [
'error',
'always',
{ autofix: true }
],
'vue/html-quotes': [
'error',
'single',
{ avoidEscape: true }
],
'vue/max-attributes-per-line': ['error', { singleline: { max: 3 } }],
'vue/first-attribute-linebreak': [
'error',
{
singleline: 'ignore',
multiline: 'below'
}
],
'vue/component-name-in-template-casing': [
'error',
'kebab-case',
{ registeredComponentsOnly: false }
],
'vue/custom-event-name-casing': ['error', 'kebab-case'],
'vue/eqeqeq': 'warn',
'vue/no-mutating-props': 'warn',
'vue/require-valid-default-prop': 'warn',
'vue/no-duplicate-attributes': 'warn',
'@typescript-eslint/no-non-null-assertion': 'off'
}
};