-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
158 lines (158 loc) · 4.15 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
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
151
152
153
154
155
156
157
158
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
settings: {
'vue-i18n': {
localeDir: 'src/localization/**/*.(json|json5)',
},
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module',
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'@vue/typescript/recommended',
'@vue/eslint-config-typescript/recommended',
'plugin:vue-i18n/recommended',
'@vue/prettier',
'@vue/eslint-config-prettier',
],
plugins: ['promise'],
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
rules: {
'prettier/prettier': [
'warn',
{
vueIndentScriptAndStyle: false,
printWidth: 80,
trailingComma: 'all',
endOfLine: 'auto',
tabWidth: 2,
semi: false,
singleQuote: true,
bracketSpacing: true,
bracketSameLine: false,
arrowParens: 'avoid',
},
],
'vue-i18n/no-v-html': 'off',
'vue-i18n/no-dynamic-keys': 'warn',
'vue-i18n/no-missing-keys': 'warn',
'vue-i18n/no-unused-keys': [
'error',
{
extensions: ['.js', '.ts', '.vue'],
},
],
'vue-i18n/no-raw-text': [
'error',
{
ignoreText: ['—', '|', '×'],
},
],
'arrow-parens': 0,
'no-debugger': 1,
'no-warning-comments': [
1,
{
terms: ['hardcoded'],
location: 'anywhere',
},
],
'no-return-await': 1,
'object-curly-spacing': ['error', 'always'],
'no-var': 'error',
'comma-dangle': [1, 'always-multiline'],
'linebreak-style': ['error', 'unix'],
'generator-star-spacing': 0,
'no-tabs': 2,
'max-len': [
1,
{
code: 80,
comments: 80,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
},
],
'no-console': [
1,
{
allow: ['warn', 'error'],
},
],
quotes: [2, 'single', { avoidEscape: false }],
'no-multiple-empty-lines': [2, { max: 1, maxEOF: 0, maxBOF: 0 }],
semi: [2, 'never'],
'vue/multi-word-component-names': 0,
'vue/component-definition-name-casing': ['error', 'kebab-case'],
'vue/valid-v-for': 2,
'vue/attributes-order': 0,
'vue/order-in-components': 1,
'vue/html-closing-bracket-newline': 0,
'vue/attribute-hyphenation': 1,
'vue/component-name-in-template-casing': [2, 'kebab-case'],
'vue/html-end-tags': 2,
'vue/html-quotes': 1,
'vue/multiline-html-element-content-newline': 1,
'vue/mustache-interpolation-spacing': 1,
'vue/no-async-in-computed-properties': 2,
'vue/no-use-v-if-with-v-for': 1,
'vue/no-dupe-keys': 2,
'vue/no-duplicate-attributes': 2,
'vue/no-multi-spaces': 1,
'vue/no-reserved-keys': 2,
'vue/no-shared-component-data': 2,
'vue/no-side-effects-in-computed-properties': 2,
'vue/no-spaces-around-equal-signs-in-attribute': 2,
'vue/no-template-key': 2,
'vue/no-textarea-mustache': 2,
'vue/no-unused-components': 1,
'vue/no-unused-vars': 1,
'vue/no-v-html': 1,
'vue/prop-name-casing': 2,
'vue/require-default-prop': 2,
'vue/require-prop-types': 2,
'vue/require-valid-default-prop': 2,
'vue/this-in-template': 2,
'vue/v-bind-style': 2,
'vue/v-on-style': 2,
'vue/valid-template-root': 2,
'vue/valid-v-bind': 2,
'vue/valid-v-else-if': 2,
'vue/valid-v-else': 2,
'vue/valid-v-model': 2,
'vue/valid-v-on': 2,
'vue/singleline-html-element-content-newline': [
1,
{
ignoreWhenNoAttributes: true,
ignoreWhenEmpty: true,
ignores: ['pre', 'textarea', 'span'],
},
],
'promise/always-return': 'error',
'promise/no-return-wrap': 'error',
'promise/param-names': 'error',
'promise/catch-or-return': 'error',
'promise/no-nesting': 'warn',
'promise/no-callback-in-promise': 'warn',
'promise/prefer-await-to-then': 'warn',
'@typescript-eslint/no-non-null-assertion': 'off',
},
}