@alexlit/lint-kit 123.1.0 → 124.1.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/prettier.js +24 -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 +63 -8
- package/packages/config-eslint/package.json +11 -50
- 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/prettier.js +21 -20
- 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 +9 -153
- 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-stylelint/package.json +2 -2
- 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}/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
|
@@ -1,291 +1,172 @@
|
|
|
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
|
-
'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
|
-
[
|
|
1
|
+
import plugin from 'eslint-plugin-vue';
|
|
2
|
+
import typescript from 'typescript-eslint';
|
|
3
|
+
|
|
4
|
+
/** @see [eslint-plugin-vue](https://eslint.vuejs.org/rules/) */
|
|
5
|
+
export const vue = [
|
|
6
|
+
...plugin.configs['flat/recommended'],
|
|
7
|
+
{
|
|
8
|
+
files: ['**/*.vue'],
|
|
9
|
+
languageOptions: { parserOptions: { parser: typescript.parser } },
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
files: ['**/pages/**/*', '**/layouts/**/*'],
|
|
13
|
+
rules: { 'vue/multi-word-component-names': 'off' },
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
rules: {
|
|
17
|
+
'vue/attributes-order': ['error', { alphabetical: true }],
|
|
18
|
+
'vue/block-lang': [
|
|
19
|
+
'error',
|
|
20
|
+
{ script: { lang: 'ts' }, style: { lang: 'scss' }, template: {} },
|
|
21
|
+
],
|
|
22
|
+
'vue/component-api-style': ['error', ['script-setup']],
|
|
23
|
+
'vue/component-definition-name-casing': ['error', 'kebab-case'],
|
|
24
|
+
'vue/component-name-in-template-casing': [
|
|
25
|
+
'error',
|
|
26
|
+
'PascalCase',
|
|
27
|
+
{ registeredComponentsOnly: false },
|
|
28
|
+
],
|
|
29
|
+
'vue/component-options-name-casing': ['error', 'PascalCase'],
|
|
30
|
+
'vue/component-tags-order': [
|
|
31
|
+
'error',
|
|
32
|
+
{ order: ['script', 'template', 'style'] },
|
|
33
|
+
],
|
|
34
|
+
'vue/define-emits-declaration': ['error'],
|
|
35
|
+
'vue/define-macros-order': [
|
|
36
|
+
'error',
|
|
219
37
|
{
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
38
|
+
defineExposeLast: true,
|
|
39
|
+
order: [
|
|
40
|
+
'defineOptions',
|
|
41
|
+
'defineModel',
|
|
42
|
+
'defineProps',
|
|
43
|
+
'defineEmits',
|
|
44
|
+
'defineSlots',
|
|
45
|
+
],
|
|
223
46
|
},
|
|
224
47
|
],
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
'error',
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
'error',
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
'error',
|
|
269
|
-
'
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
48
|
+
'vue/define-props-declaration': ['error'],
|
|
49
|
+
'vue/dot-notation': ['error'],
|
|
50
|
+
'vue/enforce-style-attribute': ['error', { allow: ['module'] }],
|
|
51
|
+
'vue/eqeqeq': ['error'],
|
|
52
|
+
'vue/html-button-has-type': ['error'],
|
|
53
|
+
'vue/html-comment-content-newline': ['warn'],
|
|
54
|
+
'vue/html-comment-content-spacing': ['warn'],
|
|
55
|
+
'vue/html-comment-indent': ['warn'],
|
|
56
|
+
'vue/html-end-tags': ['error'],
|
|
57
|
+
'vue/html-self-closing': [
|
|
58
|
+
'error',
|
|
59
|
+
{
|
|
60
|
+
html: {
|
|
61
|
+
component: 'always',
|
|
62
|
+
normal: 'never',
|
|
63
|
+
void: 'always',
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
math: 'always',
|
|
67
|
+
svg: 'always',
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
'vue/match-component-file-name': ['error'],
|
|
71
|
+
'vue/match-component-import-name': ['error'],
|
|
72
|
+
'vue/max-attributes-per-line': ['error', { singleline: 3 }],
|
|
73
|
+
'vue/max-lines-per-block': [
|
|
74
|
+
'warn',
|
|
75
|
+
{ script: 500, skipBlankLines: true, style: 500, template: 500 },
|
|
76
|
+
],
|
|
77
|
+
'vue/new-line-between-multi-line-property': ['error'],
|
|
78
|
+
'vue/next-tick-style': ['error', 'promise'],
|
|
79
|
+
'vue/no-child-content': ['error'],
|
|
80
|
+
'vue/no-console': ['error'],
|
|
81
|
+
'vue/no-custom-modifiers-on-v-model': 'off',
|
|
82
|
+
'vue/no-deprecated-model-definition': ['error'],
|
|
83
|
+
'vue/no-deprecated-scope-attribute': ['error'],
|
|
84
|
+
'vue/no-deprecated-slot-attribute': ['error'],
|
|
85
|
+
'vue/no-deprecated-slot-scope-attribute': ['error'],
|
|
86
|
+
'vue/no-duplicate-attr-inheritance': ['error'],
|
|
87
|
+
'vue/no-empty-component-block': ['error'],
|
|
88
|
+
'vue/no-invalid-model-keys': ['error'],
|
|
89
|
+
'vue/no-irregular-whitespace': ['error'],
|
|
90
|
+
'vue/no-loss-of-precision': ['error'],
|
|
91
|
+
'vue/no-multiple-objects-in-class': ['error'],
|
|
92
|
+
'vue/no-multiple-template-root': 'off',
|
|
93
|
+
'vue/no-parsing-error': ['error'],
|
|
94
|
+
'vue/no-potential-component-option-typo': ['error'],
|
|
95
|
+
'vue/no-ref-object-reactivity-loss': ['error'],
|
|
96
|
+
'vue/no-required-prop-with-default': ['error', { autofix: true }],
|
|
97
|
+
'vue/no-reserved-component-names': [
|
|
98
|
+
'error',
|
|
99
|
+
{
|
|
100
|
+
disallowVue3BuiltInComponents: true,
|
|
101
|
+
disallowVueBuiltInComponents: true,
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
'vue/no-restricted-component-names': ['error'],
|
|
105
|
+
'vue/no-restricted-component-options': ['error'],
|
|
106
|
+
'vue/no-restricted-props': ['error'],
|
|
107
|
+
'vue/no-root-v-if': ['error'],
|
|
108
|
+
'vue/no-setup-props-reactivity-loss': ['error'],
|
|
109
|
+
'vue/no-static-inline-styles': ['error', { allowBinding: true }],
|
|
110
|
+
'vue/no-this-in-before-route-enter': ['error'],
|
|
111
|
+
'vue/no-unsupported-features': ['error'],
|
|
112
|
+
'vue/no-unused-components': ['error'],
|
|
113
|
+
'vue/no-unused-emit-declarations': ['error'],
|
|
114
|
+
'vue/no-unused-refs': 'off',
|
|
115
|
+
'vue/no-use-computed-property-like-method': ['error'],
|
|
116
|
+
'vue/no-use-v-else-with-v-for': ['warn'],
|
|
117
|
+
'vue/no-useless-mustaches': ['error'],
|
|
118
|
+
'vue/no-useless-template-attributes': ['error'],
|
|
119
|
+
'vue/no-useless-v-bind': ['error'],
|
|
120
|
+
'vue/no-v-for-template-key': 'off',
|
|
121
|
+
'vue/no-v-html': ['error'],
|
|
122
|
+
'vue/no-v-model-argument': 'off',
|
|
123
|
+
'vue/no-v-text': ['error'],
|
|
124
|
+
'vue/no-v-text-v-html-on-component': ['error'],
|
|
125
|
+
'vue/object-shorthand': ['error'],
|
|
126
|
+
'vue/padding-line-between-blocks': ['error'],
|
|
127
|
+
'vue/padding-line-between-tags': [
|
|
128
|
+
'error',
|
|
129
|
+
[{ blankLine: 'always', next: '*', prev: '*' }],
|
|
130
|
+
],
|
|
131
|
+
'vue/padding-lines-in-component-definition': [
|
|
132
|
+
'error',
|
|
133
|
+
{ groupSingleLineProperties: true },
|
|
134
|
+
],
|
|
135
|
+
'vue/prefer-define-options': ['error'],
|
|
136
|
+
'vue/prefer-prop-type-boolean-first': ['error'],
|
|
137
|
+
'vue/prefer-separate-static-class': ['error'],
|
|
138
|
+
'vue/prefer-true-attribute-shorthand': ['error'],
|
|
139
|
+
'vue/quote-props': ['error', 'as-needed'],
|
|
140
|
+
'vue/require-direct-export': 'off',
|
|
141
|
+
'vue/require-explicit-slots': ['warn'],
|
|
142
|
+
'vue/require-macro-variable-name': [
|
|
143
|
+
'error',
|
|
144
|
+
{
|
|
145
|
+
defineEmits: '$emit',
|
|
146
|
+
defineProps: '$props',
|
|
147
|
+
defineSlots: '$slots',
|
|
148
|
+
useAttrs: '$attrs',
|
|
149
|
+
useSlots: '$slots',
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
'vue/require-typed-object-prop': ['error'],
|
|
153
|
+
'vue/require-typed-ref': ['error'],
|
|
154
|
+
'vue/sort-keys': 'off',
|
|
155
|
+
'vue/static-class-names-order': ['warn'],
|
|
156
|
+
'vue/this-in-template': ['error', 'never'],
|
|
157
|
+
'vue/v-bind-style': [
|
|
158
|
+
'error',
|
|
159
|
+
'shorthand',
|
|
160
|
+
{ sameNameShorthand: 'always' },
|
|
161
|
+
],
|
|
162
|
+
'vue/v-for-delimiter-style': ['error'],
|
|
163
|
+
'vue/v-if-else-key': ['error'],
|
|
164
|
+
'vue/v-on-event-hyphenation': ['error'],
|
|
165
|
+
'vue/v-on-handler-style': ['error', 'inline-function'],
|
|
166
|
+
'vue/valid-define-options': ['error'],
|
|
167
|
+
'vue/valid-next-tick': ['error'],
|
|
168
|
+
'vue/valid-v-bind-sync': ['error'],
|
|
169
|
+
'vue/valid-v-slot': ['error'],
|
|
170
|
+
},
|
|
290
171
|
},
|
|
291
|
-
|
|
172
|
+
];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-stylelint",
|
|
3
|
-
"version": "45.12.
|
|
3
|
+
"version": "45.12.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Stylelint config",
|
|
6
6
|
"keywords": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"postcss": "^8.4.40",
|
|
39
39
|
"postcss-html": "^1.7.0",
|
|
40
40
|
"prettier": "^3.3.3",
|
|
41
|
-
"stylelint": "^16.8.
|
|
41
|
+
"stylelint": "^16.8.1",
|
|
42
42
|
"stylelint-at-rule-no-children": "^0.3.1",
|
|
43
43
|
"stylelint-color-format": "^1.1.0",
|
|
44
44
|
"stylelint-config-recommended-vue": "^1.5.0",
|
package/scripts/lint.eslint.sh
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/* eslint no-var: 0 */
|
|
2
|
-
'use strict'
|
|
3
|
-
var rule = require('./rules/no-use-extend-native')
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
rules: {
|
|
7
|
-
'no-use-extend-native': rule
|
|
8
|
-
},
|
|
9
|
-
configs: {
|
|
10
|
-
recommended: {
|
|
11
|
-
plugins: ['no-use-extend-native'],
|
|
12
|
-
rules: {
|
|
13
|
-
'no-use-extend-native/no-use-extend-native': 2
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2015 Dustin Specker
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eslint-plugin-no-use-extend-native",
|
|
3
|
-
"version": "0.5.0",
|
|
4
|
-
"description": "ESLint plugin to prevent use of extended native objects",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"compile": "babel src --out-dir rules",
|
|
7
|
-
"coveralls": "nyc report --reporter=text-lcov | coveralls",
|
|
8
|
-
"lint": "eslint ./ --ignore-pattern node_modules/ --ignore-pattern rules/ --ignore-pattern ava/",
|
|
9
|
-
"test": "npm run compile && npm run lint && nyc ava"
|
|
10
|
-
},
|
|
11
|
-
"ava": {
|
|
12
|
-
"require": [
|
|
13
|
-
"esm"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
"repository": "https://github.com/dustinspecker/eslint-plugin-no-use-extend-native",
|
|
17
|
-
"bugs": "https://github.com/dustinspecker/eslint-plugin-no-use-extend-native/issues",
|
|
18
|
-
"homepage": "https://github.com/dustinspecker/eslint-plugin-no-use-extend-native",
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=6.0.0"
|
|
21
|
-
},
|
|
22
|
-
"keywords": [
|
|
23
|
-
"eslint",
|
|
24
|
-
"eslintplugin",
|
|
25
|
-
"extend",
|
|
26
|
-
"native",
|
|
27
|
-
"prototype"
|
|
28
|
-
],
|
|
29
|
-
"author": "Dustin Specker",
|
|
30
|
-
"contributors": [
|
|
31
|
-
"Brett Zamir"
|
|
32
|
-
],
|
|
33
|
-
"license": "MIT",
|
|
34
|
-
"files": [
|
|
35
|
-
"index.js",
|
|
36
|
-
"rules"
|
|
37
|
-
],
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"is-get-set-prop": "^1.0.0",
|
|
40
|
-
"is-js-type": "^2.0.0",
|
|
41
|
-
"is-obj-prop": "^1.0.0",
|
|
42
|
-
"is-proto-prop": "^2.0.0"
|
|
43
|
-
},
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"@babel/cli": "^7.8.4",
|
|
46
|
-
"@babel/preset-env": "^7.9.5",
|
|
47
|
-
"ava": "^3.6.0",
|
|
48
|
-
"coveralls": "^3.0.11",
|
|
49
|
-
"eslint": "^6.8.0",
|
|
50
|
-
"eslint-ava-rule-tester": "^4.0.0",
|
|
51
|
-
"eslint-config-dustinspecker": "^5.0.0",
|
|
52
|
-
"eslint-path-formatter": "^0.1.1",
|
|
53
|
-
"eslint-plugin-new-with-error": "^2.0.0",
|
|
54
|
-
"esm": "^3.2.25",
|
|
55
|
-
"nyc": "^15.0.1"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
# eslint-plugin-no-use-extend-native
|
|
2
|
-
[](https://badge.fury.io/js/eslint-plugin-no-use-extend-native)
|
|
3
|
-
[](https://travis-ci.org/dustinspecker/eslint-plugin-no-use-extend-native)
|
|
4
|
-
[](https://coveralls.io/r/dustinspecker/eslint-plugin-no-use-extend-native?branch=master)
|
|
5
|
-
|
|
6
|
-
[](https://codeclimate.com/github/dustinspecker/eslint-plugin-no-use-extend-native)
|
|
7
|
-
[](https://david-dm.org/dustinspecker/eslint-plugin-no-use-extend-native/#info=dependencies&view=table)
|
|
8
|
-
[](https://david-dm.org/dustinspecker/eslint-plugin-no-use-extend-native/#info=devDependencies&view=table)
|
|
9
|
-
|
|
10
|
-
> ESLint plugin to prevent use of extended native objects
|
|
11
|
-
|
|
12
|
-
*Uses [Sindre Sorhus](https://github.com/sindresorhus)'s [proto-props](https://github.com/sindresorhus/proto-props)*
|
|
13
|
-
|
|
14
|
-
## Install
|
|
15
|
-
First, install ESLint via
|
|
16
|
-
```
|
|
17
|
-
npm install --save-dev eslint
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Then install eslint-plugin-no-use-extend-native
|
|
21
|
-
```
|
|
22
|
-
npm install --save-dev eslint-plugin-no-use-extend-native
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Usage
|
|
26
|
-
In your `.eslintrc` file add the plugin as such:
|
|
27
|
-
|
|
28
|
-
```javascript
|
|
29
|
-
{
|
|
30
|
-
plugins: [
|
|
31
|
-
'no-use-extend-native'
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
To modify the single rule, `no-use-extend-native`, add the rule to your `.eslintrc.*` as such:
|
|
37
|
-
```javascript
|
|
38
|
-
{
|
|
39
|
-
plugins: [
|
|
40
|
-
'no-use-extend-native'
|
|
41
|
-
],
|
|
42
|
-
rules: {
|
|
43
|
-
'no-use-extend-native/no-use-extend-native': 1
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
The default value is `2`.
|
|
49
|
-
|
|
50
|
-
If you want the default, you can also just use the following instead of
|
|
51
|
-
all of the above:
|
|
52
|
-
|
|
53
|
-
```javascript
|
|
54
|
-
{
|
|
55
|
-
extends: ['plugin:no-use-extend-native/recommended']
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
With this plugin enabled, ESLint will find issues with using extended native objects:
|
|
60
|
-
```javascript
|
|
61
|
-
const colors = require('colors');
|
|
62
|
-
console.log('unicorn'.green);
|
|
63
|
-
// => ESLint will give an error stating 'Avoid using extended native objects'
|
|
64
|
-
|
|
65
|
-
[].customFunction();
|
|
66
|
-
// => ESLint will give an error stating 'Avoid using extended native objects'
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
More examples can be seen in the [tests](https://github.com/dustinspecker/eslint-plugin-no-use-extend-native/blob/master/test/test.js).
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
## Usage with no-extend-native
|
|
73
|
-
|
|
74
|
-
ESLint's [`no-extend-native`][no-extend-native] rule verifies code is not **modifying** a native prototype. e.g., with the `no-extend-native` rule enabled, the following lines are each considered incorrect:
|
|
75
|
-
```javascript
|
|
76
|
-
String.prototype.shortHash = function() { return this.substring(0, 7); };
|
|
77
|
-
Object.defineProperty(Array.prototype, "times", { value: 999 });
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
`no-use-extend-native` verifies code is not **using** a non-native prototype. e.g., with the `no-use-extend-native` plugin enabled, the following line is considered incorrect:
|
|
81
|
-
```javascript
|
|
82
|
-
"50bda47b09923e045759db8e8dd01a0bacd97370".shortHash() === "50bda47";
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
The `no-use-extend-native` plugin is designed to work with ESLint's `no-extend-native` rule. `no-extend-native` ensures that native prototypes aren't extended, and should a third party library extend them, `no-use-extend-native` ensures those changes aren't depended upon.
|
|
86
|
-
|
|
87
|
-
[no-extend-native]: http://eslint.org/docs/rules/no-extend-native
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
## LICENSE
|
|
91
|
-
MIT © [Dustin Specker](https://github.com/dustinspecker)
|