@alexlit/lint-kit 123.0.0 → 124.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/config-eslint/README.md +14 -29
- package/packages/config-eslint/_legacy/LICENSE +20 -0
- package/packages/config-eslint/_legacy/README.md +48 -0
- package/packages/config-eslint/_legacy/index.js +12 -0
- package/packages/config-eslint/_legacy/package.json +97 -0
- package/packages/config-eslint/_legacy/plugins/jsdoc.js +32 -0
- package/packages/config-eslint/_legacy/plugins/regexp.js +7 -0
- package/packages/config-eslint/_legacy/plugins/sonar.js +5 -0
- package/packages/config-eslint/_legacy/plugins/tanstack-query.js +4 -0
- package/packages/config-eslint/_legacy/plugins/typescript.js +157 -0
- package/packages/config-eslint/_legacy/plugins/unicorn.js +70 -0
- package/packages/config-eslint/_legacy/plugins/vitest.js +16 -0
- package/packages/config-eslint/_legacy/plugins/vue-i18n.js +34 -0
- package/packages/config-eslint/_legacy/plugins/vue.js +291 -0
- package/packages/config-eslint/{utils → _legacy/utils}/create-config.js +9 -9
- package/packages/config-eslint/index.js +44 -8
- package/packages/config-eslint/package.json +11 -53
- package/packages/config-eslint/plugins/javascript.js +143 -0
- package/packages/config-eslint/plugins/jsdoc.js +28 -26
- package/packages/config-eslint/plugins/perfectionist.js +17 -0
- package/packages/config-eslint/plugins/regexp.js +3 -6
- package/packages/config-eslint/plugins/sonar.js +10 -4
- package/packages/config-eslint/plugins/tanstack-query.js +4 -4
- package/packages/config-eslint/plugins/typescript.js +6 -156
- package/packages/config-eslint/plugins/unicorn.js +49 -66
- package/packages/config-eslint/plugins/vitest.js +17 -14
- package/packages/config-eslint/plugins/vue-accessibility.js +22 -0
- package/packages/config-eslint/plugins/vue-i18n.js +30 -28
- package/packages/config-eslint/plugins/vue.js +168 -287
- package/packages/config-hooks/package.json +2 -2
- package/packages/config-htmllint/package.json +2 -2
- package/packages/config-stylelint/package.json +3 -3
- package/scripts/lint.eslint.sh +1 -1
- package/packages/config-eslint/node_modules/eslint-plugin-no-use-extend-native/index.js +0 -17
- package/packages/config-eslint/node_modules/eslint-plugin-no-use-extend-native/license.md +0 -21
- package/packages/config-eslint/node_modules/eslint-plugin-no-use-extend-native/package.json +0 -57
- package/packages/config-eslint/node_modules/eslint-plugin-no-use-extend-native/readme.md +0 -91
- package/packages/config-eslint/node_modules/eslint-plugin-no-use-extend-native/rules/no-use-extend-native.js +0 -150
- /package/packages/config-eslint/{TODO.md → _legacy/TODO.md} +0 -0
- /package/packages/config-eslint/{constants → _legacy/constants}/allow-boolean-property-list.js +0 -0
- /package/packages/config-eslint/{constants → _legacy/constants}/boolean-prefixes.js +0 -0
- /package/packages/config-eslint/{constants → _legacy/constants}/english-verbs.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/index.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/bash.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/django.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/elixir.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/go.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/java.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/latex.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/lua.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/php.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/python.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/ruby.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/rust.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/programming/scala.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/specialized/html-symbol-entities.js +0 -0
- /package/packages/config-eslint/{dictionaries → _legacy/dictionaries}/specialized/lorem-ipsum.js +0 -0
- /package/packages/config-eslint/{legacy.js → _legacy/legacy.js} +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/array-func.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/compat.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/decorator-position.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/eslint-comments.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/etc.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/ext.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/filenames.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/import.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/jsx-a11y.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/lit-a11y.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/lit.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/more.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-await-in-promise.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-constructor-bind.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-explicit-type-exports.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-loops.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-secrets.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/no-use-extend-native.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/node.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/prettier.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/promise.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/security.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/simple-import-sort.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/sort-class-members.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/sort-destructure-keys.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/sort-keys-fix.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/spellcheck.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/sql.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/testing-library.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/typescript-sort-keys.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/unused-imports.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/vuejs-accessibility.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/wc.js +0 -0
- /package/packages/config-eslint/{plugins → _legacy/plugins}/write-good-comments.js +0 -0
- /package/packages/config-eslint/{utils → _legacy/utils}/extend-spell-checker.js +0 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/* eslint-disable spellcheck/spell-checker */
|
|
2
|
+
module.exports = {
|
|
3
|
+
extends: ['plugin:vue/vue3-recommended'],
|
|
4
|
+
|
|
5
|
+
overrides: [
|
|
6
|
+
{
|
|
7
|
+
files: ['**/pages/**/*', '**/layouts/**/*'],
|
|
8
|
+
|
|
9
|
+
rules: {
|
|
10
|
+
'vue/multi-word-component-names': 'off',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
|
|
15
|
+
plugins: ['vue'],
|
|
16
|
+
|
|
17
|
+
rules: {
|
|
18
|
+
'vue/attributes-order': [
|
|
19
|
+
'error',
|
|
20
|
+
{
|
|
21
|
+
alphabetical: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
|
|
25
|
+
'vue/block-lang': [
|
|
26
|
+
'error',
|
|
27
|
+
{
|
|
28
|
+
script: { lang: 'ts' },
|
|
29
|
+
style: { lang: 'scss' },
|
|
30
|
+
template: {},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
|
|
34
|
+
'vue/component-api-style': ['error', ['script-setup']],
|
|
35
|
+
|
|
36
|
+
'vue/component-definition-name-casing': ['error', 'kebab-case'],
|
|
37
|
+
|
|
38
|
+
'vue/component-name-in-template-casing': [
|
|
39
|
+
'error',
|
|
40
|
+
'PascalCase',
|
|
41
|
+
{
|
|
42
|
+
registeredComponentsOnly: false,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
|
|
46
|
+
'vue/component-options-name-casing': ['error', 'PascalCase'],
|
|
47
|
+
|
|
48
|
+
'vue/component-tags-order': [
|
|
49
|
+
'error',
|
|
50
|
+
{
|
|
51
|
+
order: ['script', 'template', 'style'],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
|
|
55
|
+
'vue/define-emits-declaration': ['error'],
|
|
56
|
+
|
|
57
|
+
'vue/define-macros-order': [
|
|
58
|
+
'error',
|
|
59
|
+
{
|
|
60
|
+
defineExposeLast: true,
|
|
61
|
+
|
|
62
|
+
order: [
|
|
63
|
+
'defineOptions',
|
|
64
|
+
'defineModel',
|
|
65
|
+
'defineProps',
|
|
66
|
+
'defineEmits',
|
|
67
|
+
'defineSlots',
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
|
|
72
|
+
'vue/define-props-declaration': ['error'],
|
|
73
|
+
|
|
74
|
+
'vue/dot-notation': ['error'],
|
|
75
|
+
|
|
76
|
+
'vue/enforce-style-attribute': ['error', { allow: ['module'] }],
|
|
77
|
+
|
|
78
|
+
'vue/eqeqeq': ['error'],
|
|
79
|
+
|
|
80
|
+
'vue/html-button-has-type': ['error'],
|
|
81
|
+
|
|
82
|
+
'vue/html-comment-content-newline': ['warn'],
|
|
83
|
+
|
|
84
|
+
'vue/html-comment-content-spacing': ['warn'],
|
|
85
|
+
|
|
86
|
+
'vue/html-comment-indent': ['warn'],
|
|
87
|
+
|
|
88
|
+
'vue/html-end-tags': ['error'],
|
|
89
|
+
|
|
90
|
+
// 'vue/html-self-closing': [], // delegate to plugins/prettier
|
|
91
|
+
'vue/match-component-file-name': ['error'],
|
|
92
|
+
|
|
93
|
+
'vue/match-component-import-name': ['error'],
|
|
94
|
+
|
|
95
|
+
'vue/max-attributes-per-line': [
|
|
96
|
+
'error',
|
|
97
|
+
{
|
|
98
|
+
singleline: 3,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
|
|
102
|
+
'vue/max-lines-per-block': [
|
|
103
|
+
'warn',
|
|
104
|
+
{
|
|
105
|
+
script: 500,
|
|
106
|
+
skipBlankLines: true,
|
|
107
|
+
style: 500,
|
|
108
|
+
template: 500,
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
|
|
112
|
+
'vue/new-line-between-multi-line-property': ['error'],
|
|
113
|
+
|
|
114
|
+
'vue/next-tick-style': ['error', 'promise'],
|
|
115
|
+
|
|
116
|
+
'vue/no-child-content': ['error'],
|
|
117
|
+
|
|
118
|
+
'vue/no-console': ['error'],
|
|
119
|
+
|
|
120
|
+
'vue/no-custom-modifiers-on-v-model': 'off',
|
|
121
|
+
|
|
122
|
+
'vue/no-deprecated-model-definition': ['error'],
|
|
123
|
+
|
|
124
|
+
'vue/no-deprecated-scope-attribute': ['error'],
|
|
125
|
+
|
|
126
|
+
'vue/no-deprecated-slot-attribute': ['error'],
|
|
127
|
+
|
|
128
|
+
'vue/no-deprecated-slot-scope-attribute': ['error'],
|
|
129
|
+
|
|
130
|
+
'vue/no-duplicate-attr-inheritance': ['error'],
|
|
131
|
+
|
|
132
|
+
'vue/no-empty-component-block': ['error'],
|
|
133
|
+
|
|
134
|
+
'vue/no-invalid-model-keys': ['error'],
|
|
135
|
+
|
|
136
|
+
'vue/no-irregular-whitespace': ['error'],
|
|
137
|
+
|
|
138
|
+
'vue/no-loss-of-precision': ['error'],
|
|
139
|
+
|
|
140
|
+
'vue/no-multiple-objects-in-class': ['error'],
|
|
141
|
+
|
|
142
|
+
'vue/no-multiple-template-root': 'off',
|
|
143
|
+
|
|
144
|
+
'vue/no-parsing-error': ['error'],
|
|
145
|
+
|
|
146
|
+
'vue/no-potential-component-option-typo': ['error'],
|
|
147
|
+
|
|
148
|
+
'vue/no-ref-object-reactivity-loss': ['error'],
|
|
149
|
+
|
|
150
|
+
'vue/no-required-prop-with-default': [
|
|
151
|
+
'error',
|
|
152
|
+
{
|
|
153
|
+
autofix: true,
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
|
|
157
|
+
'vue/no-reserved-component-names': [
|
|
158
|
+
'error',
|
|
159
|
+
{
|
|
160
|
+
disallowVue3BuiltInComponents: true,
|
|
161
|
+
disallowVueBuiltInComponents: true,
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
|
|
165
|
+
'vue/no-restricted-component-names': ['error'],
|
|
166
|
+
|
|
167
|
+
'vue/no-restricted-component-options': ['error'],
|
|
168
|
+
|
|
169
|
+
'vue/no-restricted-props': ['error'],
|
|
170
|
+
|
|
171
|
+
'vue/no-root-v-if': ['error'],
|
|
172
|
+
|
|
173
|
+
'vue/no-setup-props-reactivity-loss': ['error'],
|
|
174
|
+
|
|
175
|
+
'vue/no-static-inline-styles': [
|
|
176
|
+
'error',
|
|
177
|
+
{
|
|
178
|
+
allowBinding: true,
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
|
|
182
|
+
'vue/no-this-in-before-route-enter': ['error'],
|
|
183
|
+
|
|
184
|
+
'vue/no-unsupported-features': ['error'],
|
|
185
|
+
|
|
186
|
+
'vue/no-unused-components': ['error'],
|
|
187
|
+
|
|
188
|
+
'vue/no-unused-emit-declarations': ['error'],
|
|
189
|
+
|
|
190
|
+
'vue/no-unused-refs': 'off',
|
|
191
|
+
|
|
192
|
+
'vue/no-use-computed-property-like-method': ['error'],
|
|
193
|
+
|
|
194
|
+
'vue/no-use-v-else-with-v-for': ['warn'],
|
|
195
|
+
|
|
196
|
+
'vue/no-useless-mustaches': ['error'],
|
|
197
|
+
|
|
198
|
+
'vue/no-useless-template-attributes': ['error'],
|
|
199
|
+
|
|
200
|
+
'vue/no-useless-v-bind': ['error'],
|
|
201
|
+
|
|
202
|
+
'vue/no-v-for-template-key': 'off',
|
|
203
|
+
|
|
204
|
+
'vue/no-v-html': ['error'],
|
|
205
|
+
|
|
206
|
+
'vue/no-v-model-argument': 'off',
|
|
207
|
+
|
|
208
|
+
'vue/no-v-text': ['error'],
|
|
209
|
+
|
|
210
|
+
'vue/no-v-text-v-html-on-component': ['error'],
|
|
211
|
+
|
|
212
|
+
'vue/object-shorthand': ['error'],
|
|
213
|
+
|
|
214
|
+
'vue/padding-line-between-blocks': ['error'],
|
|
215
|
+
|
|
216
|
+
'vue/padding-line-between-tags': [
|
|
217
|
+
'error',
|
|
218
|
+
[
|
|
219
|
+
{
|
|
220
|
+
blankLine: 'always',
|
|
221
|
+
next: '*',
|
|
222
|
+
prev: '*',
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
],
|
|
226
|
+
|
|
227
|
+
'vue/padding-lines-in-component-definition': [
|
|
228
|
+
'error',
|
|
229
|
+
{ groupSingleLineProperties: true },
|
|
230
|
+
],
|
|
231
|
+
|
|
232
|
+
'vue/prefer-define-options': ['error'],
|
|
233
|
+
|
|
234
|
+
'vue/prefer-prop-type-boolean-first': ['error'],
|
|
235
|
+
|
|
236
|
+
'vue/prefer-separate-static-class': ['error'],
|
|
237
|
+
|
|
238
|
+
'vue/prefer-true-attribute-shorthand': ['error'],
|
|
239
|
+
|
|
240
|
+
'vue/quote-props': ['error', 'as-needed'],
|
|
241
|
+
|
|
242
|
+
'vue/require-direct-export': 'off',
|
|
243
|
+
|
|
244
|
+
'vue/require-explicit-slots': ['warn'],
|
|
245
|
+
|
|
246
|
+
'vue/require-macro-variable-name': [
|
|
247
|
+
'error',
|
|
248
|
+
{
|
|
249
|
+
defineEmits: '$emit',
|
|
250
|
+
defineProps: '$props',
|
|
251
|
+
defineSlots: '$slots',
|
|
252
|
+
useAttrs: '$attrs',
|
|
253
|
+
useSlots: '$slots',
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
|
|
257
|
+
'vue/require-typed-object-prop': ['error'],
|
|
258
|
+
|
|
259
|
+
'vue/require-typed-ref': ['error'],
|
|
260
|
+
|
|
261
|
+
'vue/sort-keys': 'off', // delegate to sort-keys-fix,
|
|
262
|
+
|
|
263
|
+
'vue/static-class-names-order': ['warn'],
|
|
264
|
+
|
|
265
|
+
'vue/this-in-template': ['error', 'never'],
|
|
266
|
+
|
|
267
|
+
'vue/v-bind-style': [
|
|
268
|
+
'error',
|
|
269
|
+
'shorthand',
|
|
270
|
+
{
|
|
271
|
+
sameNameShorthand: 'always',
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
|
|
275
|
+
'vue/v-for-delimiter-style': ['error'],
|
|
276
|
+
|
|
277
|
+
'vue/v-if-else-key': ['error'],
|
|
278
|
+
|
|
279
|
+
'vue/v-on-event-hyphenation': ['error'],
|
|
280
|
+
|
|
281
|
+
'vue/v-on-handler-style': ['error', 'inline-function'],
|
|
282
|
+
|
|
283
|
+
'vue/valid-define-options': ['error'],
|
|
284
|
+
|
|
285
|
+
'vue/valid-next-tick': ['error'],
|
|
286
|
+
|
|
287
|
+
'vue/valid-v-bind-sync': ['error'],
|
|
288
|
+
|
|
289
|
+
'vue/valid-v-slot': ['error'],
|
|
290
|
+
},
|
|
291
|
+
};
|
|
@@ -10,7 +10,7 @@ const DEFAULT_PLUGINS = {
|
|
|
10
10
|
* @see [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import)
|
|
11
11
|
* @see [eslint-import-resolver-alias](https://github.com/johvin/eslint-import-resolver-alias)
|
|
12
12
|
*/
|
|
13
|
-
import:
|
|
13
|
+
import: false,
|
|
14
14
|
|
|
15
15
|
/** @see [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) */
|
|
16
16
|
jsdoc: true,
|
|
@@ -19,37 +19,37 @@ const DEFAULT_PLUGINS = {
|
|
|
19
19
|
regexp: true,
|
|
20
20
|
|
|
21
21
|
/** @see [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort) */
|
|
22
|
-
'simple-import-sort':
|
|
22
|
+
// 'simple-import-sort': false,
|
|
23
23
|
|
|
24
24
|
/** @see [eslint-plugin-sonarjs](https://github.com/SonarSource/eslint-plugin-sonarjs) */
|
|
25
25
|
sonar: true,
|
|
26
26
|
|
|
27
27
|
/** @see [eslint-plugin-sort-class-members](https://github.com/bryanrsmith/eslint-plugin-sort-class-members) */
|
|
28
|
-
'sort-class-members':
|
|
28
|
+
// 'sort-class-members': false,
|
|
29
29
|
|
|
30
30
|
/** @see [eslint-plugin-sort-destructure-keys](https://github.com/mthadley/eslint-plugin-sort-destructure-keys) */
|
|
31
|
-
'sort-destructure-keys':
|
|
31
|
+
// 'sort-destructure-keys': false,
|
|
32
32
|
|
|
33
33
|
/** @see [eslint-plugin-sort-keys-fix](https://github.com/leo-buneev/eslint-plugin-sort-keys-fix) */
|
|
34
|
-
'sort-keys-fix':
|
|
34
|
+
// 'sort-keys-fix': false,
|
|
35
35
|
|
|
36
36
|
/** @see [@tanstack/query](https://tanstack.com/query/latest/docs/eslint/eslint-plugin-query) */
|
|
37
37
|
'tanstack-query': true,
|
|
38
38
|
|
|
39
39
|
/** @see [eslint-plugin-testing-library](https://github.com/testing-library/eslint-plugin-testing-library) */
|
|
40
|
-
'testing-library':
|
|
40
|
+
'testing-library': false,
|
|
41
41
|
|
|
42
42
|
/** @see [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) */
|
|
43
43
|
typescript: true,
|
|
44
44
|
|
|
45
45
|
/** @see [eslint-plugin-typescript-sort-keys](https://github.com/infctr/eslint-plugin-typescript-sort-keys) */
|
|
46
|
-
'typescript-sort-keys': true,
|
|
46
|
+
// 'typescript-sort-keys': true,
|
|
47
47
|
|
|
48
48
|
/** @see [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) */
|
|
49
49
|
unicorn: true,
|
|
50
50
|
|
|
51
51
|
/** @see [eslint-plugin-unused-imports](https://github.com/sweepline/eslint-plugin-unused-imports) */
|
|
52
|
-
'unused-imports': true,
|
|
52
|
+
// 'unused-imports': true,
|
|
53
53
|
|
|
54
54
|
/** @see [eslint-plugin-vitest](https://github.com/veritem/eslint-plugin-vitest) */
|
|
55
55
|
vitest: true,
|
|
@@ -60,7 +60,7 @@ const DEFAULT_PLUGINS = {
|
|
|
60
60
|
/** @see [eslint-plugin-vue-i18n](https://eslint-plugin-vue-i18n.intlify.dev/) */
|
|
61
61
|
'vue-i18n': true,
|
|
62
62
|
|
|
63
|
-
/** @see [eslint-plugin-vuejs-accessibility](https://
|
|
63
|
+
/** @see [eslint-plugin-vuejs-accessibility](https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/) */
|
|
64
64
|
'vuejs-accessibility': true,
|
|
65
65
|
};
|
|
66
66
|
|
|
@@ -1,12 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable no-restricted-imports */
|
|
2
|
+
import globals from 'globals';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import { javascript } from './plugins/javascript.js';
|
|
5
|
+
import { jsdoc } from './plugins/jsdoc.js';
|
|
6
|
+
import { perfectionist } from './plugins/perfectionist.js';
|
|
7
|
+
import { regexp } from './plugins/regexp.js';
|
|
8
|
+
import { sonar } from './plugins/sonar.js';
|
|
9
|
+
import { tanstackQuery } from './plugins/tanstack-query.js';
|
|
10
|
+
import { typescript } from './plugins/typescript.js';
|
|
11
|
+
import { unicorn } from './plugins/unicorn.js';
|
|
12
|
+
import { vitest } from './plugins/vitest.js';
|
|
13
|
+
import { vueAccessibility } from './plugins/vue-accessibility.js';
|
|
14
|
+
import { vueI18n } from './plugins/vue-i18n.js';
|
|
15
|
+
import { vue } from './plugins/vue.js';
|
|
5
16
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
}
|
|
17
|
+
export const config = [
|
|
18
|
+
{ files: ['**/*.{js,mjs,cjs,typescript,vue}'] },
|
|
19
|
+
{ languageOptions: { globals: globals.browser } },
|
|
9
20
|
|
|
10
|
-
|
|
21
|
+
...javascript,
|
|
22
|
+
...jsdoc,
|
|
23
|
+
...perfectionist,
|
|
24
|
+
...regexp,
|
|
25
|
+
...sonar,
|
|
26
|
+
...tanstackQuery,
|
|
27
|
+
...typescript,
|
|
28
|
+
...unicorn,
|
|
29
|
+
...vitest,
|
|
30
|
+
...vue,
|
|
31
|
+
...vueAccessibility,
|
|
32
|
+
...vueI18n,
|
|
33
|
+
];
|
|
11
34
|
|
|
12
|
-
|
|
35
|
+
export {
|
|
36
|
+
javascript,
|
|
37
|
+
jsdoc,
|
|
38
|
+
perfectionist,
|
|
39
|
+
regexp,
|
|
40
|
+
sonar,
|
|
41
|
+
tanstackQuery,
|
|
42
|
+
typescript,
|
|
43
|
+
unicorn,
|
|
44
|
+
vitest,
|
|
45
|
+
vue,
|
|
46
|
+
vueAccessibility,
|
|
47
|
+
vueI18n,
|
|
48
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "91.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Eslint config",
|
|
6
6
|
"keywords": [
|
|
@@ -21,16 +21,11 @@
|
|
|
21
21
|
"maintainers": [
|
|
22
22
|
"Alexey Litovchenko <alex.lit@outlook.com> (https://alexlit.gitlab.io)"
|
|
23
23
|
],
|
|
24
|
-
"type": "
|
|
24
|
+
"type": "module",
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"files": [
|
|
27
27
|
"README.md",
|
|
28
|
-
"
|
|
29
|
-
"dictionaries",
|
|
30
|
-
"index.js",
|
|
31
|
-
"legacy.js",
|
|
32
|
-
"plugins",
|
|
33
|
-
"utils"
|
|
28
|
+
"index.js"
|
|
34
29
|
],
|
|
35
30
|
"scripts": {
|
|
36
31
|
"release": "../../scripts/release.sh",
|
|
@@ -38,58 +33,21 @@
|
|
|
38
33
|
"up": "../../scripts/up.sh"
|
|
39
34
|
},
|
|
40
35
|
"dependencies": {
|
|
41
|
-
"@
|
|
42
|
-
"@eslint/eslintrc": "^3.1.0",
|
|
36
|
+
"@eslint/js": "^9.8.0",
|
|
43
37
|
"@intlify/eslint-plugin-vue-i18n": "^3.0.0",
|
|
44
|
-
"@tanstack/eslint-plugin-query": "^5.51.
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"eslint": "^
|
|
48
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
49
|
-
"eslint-config-prettier": "^9.1.0",
|
|
50
|
-
"eslint-define-config": "^2.1.0",
|
|
51
|
-
"eslint-import-resolver-alias": "^1.1.2",
|
|
52
|
-
"eslint-plugin-array-func": "^4.0.0",
|
|
53
|
-
"eslint-plugin-compat": "^6.0.0",
|
|
54
|
-
"eslint-plugin-decorator-position": "^5.0.2",
|
|
55
|
-
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
56
|
-
"eslint-plugin-etc": "^2.0.3",
|
|
57
|
-
"eslint-plugin-ext": "^0.1.0",
|
|
58
|
-
"eslint-plugin-filenames": "^1.3.2",
|
|
59
|
-
"eslint-plugin-import": "^2.29.1",
|
|
60
|
-
"eslint-plugin-jsdoc": "^48.8.3",
|
|
61
|
-
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
62
|
-
"eslint-plugin-lit": "^1.14.0",
|
|
63
|
-
"eslint-plugin-lit-a11y": "^4.1.4",
|
|
64
|
-
"eslint-plugin-more": "^1.0.5",
|
|
65
|
-
"eslint-plugin-no-await-in-promise": "^2.0.1",
|
|
66
|
-
"eslint-plugin-no-constructor-bind": "^2.0.4",
|
|
67
|
-
"eslint-plugin-no-explicit-type-exports": "^0.12.1",
|
|
68
|
-
"eslint-plugin-no-loops": "^0.4.0",
|
|
69
|
-
"eslint-plugin-no-secrets": "^1.0.2",
|
|
70
|
-
"eslint-plugin-no-use-extend-native": "^0.5.0",
|
|
71
|
-
"eslint-plugin-node": "^11.1.0",
|
|
72
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
73
|
-
"eslint-plugin-promise": "^7.0.0",
|
|
38
|
+
"@tanstack/eslint-plugin-query": "^5.51.15",
|
|
39
|
+
"eslint": "^9.8.0",
|
|
40
|
+
"eslint-plugin-jsdoc": "^48.10.1",
|
|
41
|
+
"eslint-plugin-perfectionist": "^3.0.0",
|
|
74
42
|
"eslint-plugin-regexp": "^2.6.0",
|
|
75
|
-
"eslint-plugin-security": "^3.0.1",
|
|
76
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
77
43
|
"eslint-plugin-sonarjs": "^1.0.4",
|
|
78
|
-
"eslint-plugin-sort-class-members": "^1.20.0",
|
|
79
|
-
"eslint-plugin-sort-destructure-keys": "^2.0.0",
|
|
80
|
-
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
81
|
-
"eslint-plugin-spellcheck": "^0.0.20",
|
|
82
|
-
"eslint-plugin-sql": "^2.5.0",
|
|
83
|
-
"eslint-plugin-testing-library": "^6.2.2",
|
|
84
|
-
"eslint-plugin-typescript-sort-keys": "^3.2.0",
|
|
85
44
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
86
|
-
"eslint-plugin-unused-imports": "^4.0.1",
|
|
87
45
|
"eslint-plugin-vitest": "^0.5.4",
|
|
88
46
|
"eslint-plugin-vue": "^9.27.0",
|
|
89
47
|
"eslint-plugin-vuejs-accessibility": "^2.4.1",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"typescript": "^
|
|
48
|
+
"globals": "^15.8.0",
|
|
49
|
+
"typescript": "^5.5.4",
|
|
50
|
+
"typescript-eslint": "^7.18.0"
|
|
93
51
|
},
|
|
94
52
|
"engines": {
|
|
95
53
|
"node": ">=18.18"
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/* eslint-disable sonarjs/no-duplicate-string */
|
|
2
|
+
import plugin from '@eslint/js';
|
|
3
|
+
|
|
4
|
+
/** @see [eslint](https://eslint.org) */
|
|
5
|
+
export const javascript = [
|
|
6
|
+
plugin.configs.recommended,
|
|
7
|
+
|
|
8
|
+
{
|
|
9
|
+
rules: {
|
|
10
|
+
'class-methods-use-this': 'off',
|
|
11
|
+
curly: 'error',
|
|
12
|
+
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
|
|
13
|
+
'grouped-accessor-pairs': ['error', 'getBeforeSet'],
|
|
14
|
+
|
|
15
|
+
'lines-around-comment': [
|
|
16
|
+
'warn',
|
|
17
|
+
{
|
|
18
|
+
afterBlockComment: false,
|
|
19
|
+
afterLineComment: false,
|
|
20
|
+
|
|
21
|
+
allowArrayEnd: true,
|
|
22
|
+
allowArrayStart: true,
|
|
23
|
+
|
|
24
|
+
allowBlockEnd: true,
|
|
25
|
+
allowBlockStart: true,
|
|
26
|
+
|
|
27
|
+
allowClassEnd: true,
|
|
28
|
+
allowClassStart: true,
|
|
29
|
+
|
|
30
|
+
allowObjectEnd: true,
|
|
31
|
+
allowObjectStart: true,
|
|
32
|
+
|
|
33
|
+
beforeBlockComment: true,
|
|
34
|
+
beforeLineComment: false,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
|
|
38
|
+
'no-console': 'warn',
|
|
39
|
+
|
|
40
|
+
'no-implicit-coercion': 'error',
|
|
41
|
+
|
|
42
|
+
'no-param-reassign': ['error', { props: false }],
|
|
43
|
+
|
|
44
|
+
'no-restricted-exports': [
|
|
45
|
+
'error',
|
|
46
|
+
{
|
|
47
|
+
restrictedNamedExports: [
|
|
48
|
+
'then', // this will cause tons of confusion when your module is dynamically `import()`ed, and will break in most node ESM versions
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
|
|
53
|
+
'no-restricted-imports': [
|
|
54
|
+
'error',
|
|
55
|
+
{
|
|
56
|
+
patterns: [
|
|
57
|
+
{
|
|
58
|
+
group: ['.', '..', '*/..'],
|
|
59
|
+
message: 'Use absolute path instead',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
group: ['@/', '@@/'],
|
|
63
|
+
message: 'Use "~" instead of "@"',
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
|
|
69
|
+
'no-return-await': 'off',
|
|
70
|
+
'no-shadow': 'off',
|
|
71
|
+
'no-underscore-dangle': 'off',
|
|
72
|
+
'no-unused-vars': 'off',
|
|
73
|
+
'no-use-before-define': 'off',
|
|
74
|
+
'nonblock-statement-body-position': ['error', 'below'],
|
|
75
|
+
'padding-line-between-statements': [
|
|
76
|
+
'warn',
|
|
77
|
+
// always
|
|
78
|
+
{ blankLine: 'always', next: '*', prev: 'block-like' },
|
|
79
|
+
{ blankLine: 'always', next: '*', prev: 'case' },
|
|
80
|
+
{ blankLine: 'always', next: '*', prev: 'cjs-export' },
|
|
81
|
+
{ blankLine: 'always', next: '*', prev: 'cjs-import' },
|
|
82
|
+
{ blankLine: 'always', next: '*', prev: 'class' },
|
|
83
|
+
{ blankLine: 'always', next: '*', prev: 'default' },
|
|
84
|
+
{ blankLine: 'always', next: '*', prev: 'directive' },
|
|
85
|
+
{ blankLine: 'always', next: '*', prev: 'expression' },
|
|
86
|
+
{ blankLine: 'always', next: '*', prev: 'iife' },
|
|
87
|
+
{ blankLine: 'always', next: '*', prev: 'multiline-block-like' },
|
|
88
|
+
{ blankLine: 'always', next: '*', prev: 'multiline-const' },
|
|
89
|
+
{ blankLine: 'always', next: '*', prev: 'multiline-expression' },
|
|
90
|
+
{ blankLine: 'always', next: '*', prev: 'multiline-let' },
|
|
91
|
+
{ blankLine: 'always', next: '*', prev: 'multiline-var' },
|
|
92
|
+
{ blankLine: 'always', next: '*', prev: 'singleline-const' },
|
|
93
|
+
{ blankLine: 'always', next: '*', prev: 'singleline-let' },
|
|
94
|
+
{ blankLine: 'always', next: '*', prev: 'singleline-var' },
|
|
95
|
+
{ blankLine: 'always', next: 'block-like', prev: '*' },
|
|
96
|
+
{ blankLine: 'always', next: 'cjs-export', prev: '*' },
|
|
97
|
+
{ blankLine: 'always', next: 'cjs-import', prev: '*' },
|
|
98
|
+
{ blankLine: 'always', next: 'class', prev: '*' },
|
|
99
|
+
{ blankLine: 'always', next: 'expression', prev: '*' },
|
|
100
|
+
{ blankLine: 'always', next: 'function', prev: '*' },
|
|
101
|
+
{ blankLine: 'always', next: 'iife', prev: '*' },
|
|
102
|
+
{ blankLine: 'always', next: 'multiline-block-like', prev: '*' },
|
|
103
|
+
{ blankLine: 'always', next: 'multiline-const', prev: '*' },
|
|
104
|
+
{ blankLine: 'always', next: 'multiline-expression', prev: '*' },
|
|
105
|
+
{ blankLine: 'always', next: 'multiline-let', prev: '*' },
|
|
106
|
+
{ blankLine: 'always', next: 'multiline-var', prev: '*' },
|
|
107
|
+
{ blankLine: 'always', next: 'return', prev: '*' },
|
|
108
|
+
{ blankLine: 'always', next: 'switch', prev: '*' },
|
|
109
|
+
// any
|
|
110
|
+
{ blankLine: 'any', next: 'expression', prev: 'expression' },
|
|
111
|
+
{
|
|
112
|
+
blankLine: 'any',
|
|
113
|
+
next: 'singleline-const',
|
|
114
|
+
prev: 'singleline-const',
|
|
115
|
+
},
|
|
116
|
+
{ blankLine: 'any', next: 'singleline-let', prev: 'singleline-let' },
|
|
117
|
+
{ blankLine: 'any', next: 'singleline-var', prev: 'singleline-var' },
|
|
118
|
+
// never
|
|
119
|
+
{ blankLine: 'never', next: 'cjs-export', prev: 'cjs-export' },
|
|
120
|
+
{ blankLine: 'never', next: 'cjs-import', prev: 'cjs-import' },
|
|
121
|
+
{ blankLine: 'never', next: 'directive', prev: 'directive' },
|
|
122
|
+
],
|
|
123
|
+
|
|
124
|
+
quotes: ['error', 'single'],
|
|
125
|
+
'require-await': 'off',
|
|
126
|
+
|
|
127
|
+
'sort-imports': [
|
|
128
|
+
'warn',
|
|
129
|
+
{
|
|
130
|
+
allowSeparatedGroups: true,
|
|
131
|
+
ignoreCase: true,
|
|
132
|
+
ignoreDeclarationSort: true,
|
|
133
|
+
ignoreMemberSort: false,
|
|
134
|
+
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
|
|
138
|
+
'sort-keys': 'off',
|
|
139
|
+
|
|
140
|
+
'sort-vars': 'warn',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
];
|