@alexlit/lint-kit 214.4.0 → 215.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/README.md +27 -22
- package/eslint.config.js +23 -56
- package/lint-staged.config.js +2 -2
- package/linthtml.config.js +2 -2
- package/package.json +3 -2
- package/packages/config-eslint/README.md +156 -106
- package/packages/config-eslint/base.js +5 -3
- package/packages/config-eslint/index.d.ts +112 -0
- package/packages/config-eslint/index.js +79 -23
- package/packages/config-eslint/package.json +19 -16
- package/packages/config-eslint/plugins/de-morgan.js +9 -4
- package/packages/config-eslint/plugins/import-x.js +50 -37
- package/packages/config-eslint/plugins/javascript.js +96 -85
- package/packages/config-eslint/plugins/jsdoc.js +24 -17
- package/packages/config-eslint/plugins/json.js +31 -24
- package/packages/config-eslint/plugins/perfectionist.js +108 -95
- package/packages/config-eslint/plugins/pinia.js +17 -10
- package/packages/config-eslint/plugins/prettier.js +24 -10
- package/packages/config-eslint/plugins/regexp.js +16 -9
- package/packages/config-eslint/plugins/sonar.js +19 -12
- package/packages/config-eslint/plugins/stylistic.js +107 -100
- package/packages/config-eslint/plugins/tailwindcss.js +17 -6
- package/packages/config-eslint/plugins/tanstack-query.js +16 -9
- package/packages/config-eslint/plugins/typescript-type-checked.js +38 -33
- package/packages/config-eslint/plugins/typescript.js +23 -14
- package/packages/config-eslint/plugins/unicorn.js +73 -64
- package/packages/config-eslint/plugins/unocss.js +12 -5
- package/packages/config-eslint/plugins/vitest.js +20 -13
- package/packages/config-eslint/plugins/vue-accessibility.js +22 -13
- package/packages/config-eslint/plugins/vue-i18n.js +38 -31
- package/packages/config-eslint/plugins/vue.js +255 -242
- package/packages/config-eslint/plugins/zod.js +17 -10
- package/packages/config-eslint/rules/typescript.js +1 -1
- package/packages/config-hooks/README.md +119 -37
- package/packages/config-hooks/index.d.ts +19 -0
- package/packages/config-hooks/lint-staged.js +8 -6
- package/packages/config-hooks/package.json +3 -1
- package/packages/config-htmllint/README.md +50 -22
- package/packages/config-htmllint/index.d.ts +13 -0
- package/packages/config-htmllint/index.js +15 -7
- package/packages/config-htmllint/package.json +4 -2
- package/packages/config-markdownlint/README.md +40 -5
- package/packages/config-markdownlint/index.json +0 -2
- package/packages/config-markdownlint/package.json +1 -1
- package/packages/config-npmlint/README.md +48 -5
- package/packages/config-npmlint/package.json +3 -3
- package/packages/config-prettier/README.md +106 -23
- package/packages/config-prettier/index.d.ts +92 -0
- package/packages/config-prettier/index.js +60 -74
- package/packages/config-prettier/package.json +4 -3
- package/packages/config-prettier/plugins/jsdoc.js +12 -3
- package/packages/config-prettier/plugins/mdc.js +12 -3
- package/packages/config-prettier/plugins/packagejson.js +12 -3
- package/packages/config-prettier/plugins/php.js +12 -3
- package/packages/config-prettier/plugins/pug.js +12 -3
- package/packages/config-prettier/plugins/ruby.js +10 -10
- package/packages/config-prettier/plugins/sh.js +12 -3
- package/packages/config-prettier/plugins/solidity.js +12 -3
- package/packages/config-prettier/plugins/sort-json.js +12 -3
- package/packages/config-prettier/plugins/sql.js +12 -3
- package/packages/config-prettier/plugins/tailwindcss.js +12 -3
- package/packages/config-prettier/plugins/xml.js +12 -3
- package/packages/config-stylelint/README.md +131 -44
- package/packages/config-stylelint/index.d.ts +52 -0
- package/packages/config-stylelint/index.js +169 -165
- package/packages/config-stylelint/package.json +3 -1
- package/packages/config-stylelint/plugins/a11y.js +24 -11
- package/packages/config-stylelint/plugins/bem.js +10 -3
- package/packages/config-stylelint/plugins/color-format.js +14 -4
- package/packages/config-stylelint/plugins/declaration-block-no-ignored-properties.js +15 -4
- package/packages/config-stylelint/plugins/gamut.js +12 -4
- package/packages/config-stylelint/plugins/high-performance-animation.js +12 -3
- package/packages/config-stylelint/plugins/logical-css.js +10 -3
- package/packages/config-stylelint/plugins/media-use-custom-media.js +12 -4
- package/packages/config-stylelint/plugins/no-indistinguishable-colors.js +15 -4
- package/packages/config-stylelint/plugins/no-nested-media.js +12 -4
- package/packages/config-stylelint/plugins/no-unresolved-module.js +12 -3
- package/packages/config-stylelint/plugins/no-unsupported-browser-features.js +12 -3
- package/packages/config-stylelint/plugins/order.js +13 -3
- package/packages/config-stylelint/plugins/prettier.js +12 -4
- package/packages/config-stylelint/plugins/scss.js +13 -3
- package/packages/config-stylelint/plugins/selector-no-empty.js +12 -4
- package/packages/config-stylelint/plugins/use-nesting.js +15 -4
- package/packages/config-stylelint/plugins/vue.js +11 -2
- package/prettier.config.js +15 -7
- package/scripts/semver.sh +3 -3
- package/stylelint.config.js +25 -11
- package/packages/config-eslint/_legacy/LICENSE +0 -20
- package/packages/config-eslint/_legacy/README.md +0 -48
- package/packages/config-eslint/_legacy/constants/allow-boolean-property-list.js +0 -38
- package/packages/config-eslint/_legacy/constants/boolean-prefixes.js +0 -11
- package/packages/config-eslint/_legacy/constants/english-verbs.js +0 -3368
- package/packages/config-eslint/_legacy/dictionaries/index.js +0 -467
- package/packages/config-eslint/_legacy/dictionaries/programming/bash.js +0 -25
- package/packages/config-eslint/_legacy/dictionaries/programming/django.js +0 -2345
- package/packages/config-eslint/_legacy/dictionaries/programming/elixir.js +0 -64
- package/packages/config-eslint/_legacy/dictionaries/programming/go.js +0 -7748
- package/packages/config-eslint/_legacy/dictionaries/programming/java.js +0 -33527
- package/packages/config-eslint/_legacy/dictionaries/programming/latex.js +0 -675
- package/packages/config-eslint/_legacy/dictionaries/programming/lua.js +0 -394
- package/packages/config-eslint/_legacy/dictionaries/programming/php.js +0 -9788
- package/packages/config-eslint/_legacy/dictionaries/programming/python.js +0 -367
- package/packages/config-eslint/_legacy/dictionaries/programming/ruby.js +0 -357
- package/packages/config-eslint/_legacy/dictionaries/programming/rust.js +0 -115
- package/packages/config-eslint/_legacy/dictionaries/programming/scala.js +0 -2755
- package/packages/config-eslint/_legacy/dictionaries/specialized/html-symbol-entities.js +0 -1118
- package/packages/config-eslint/_legacy/dictionaries/specialized/lorem-ipsum.js +0 -359
- package/packages/config-eslint/_legacy/index.js +0 -12
- package/packages/config-eslint/_legacy/legacy.js +0 -3
- package/packages/config-eslint/_legacy/package.json +0 -97
- package/packages/config-eslint/_legacy/plugins/array-func.js +0 -20
- package/packages/config-eslint/_legacy/plugins/compat.js +0 -7
- package/packages/config-eslint/_legacy/plugins/decorator-position.js +0 -15
- package/packages/config-eslint/_legacy/plugins/eslint-comments.js +0 -9
- package/packages/config-eslint/_legacy/plugins/etc.js +0 -13
- package/packages/config-eslint/_legacy/plugins/ext.js +0 -12
- package/packages/config-eslint/_legacy/plugins/filenames.js +0 -38
- package/packages/config-eslint/_legacy/plugins/import.js +0 -133
- package/packages/config-eslint/_legacy/plugins/jsdoc.js +0 -32
- package/packages/config-eslint/_legacy/plugins/jsx-a11y.js +0 -5
- package/packages/config-eslint/_legacy/plugins/lit-a11y.js +0 -5
- package/packages/config-eslint/_legacy/plugins/lit.js +0 -9
- package/packages/config-eslint/_legacy/plugins/more.js +0 -17
- package/packages/config-eslint/_legacy/plugins/no-await-in-promise.js +0 -5
- package/packages/config-eslint/_legacy/plugins/no-constructor-bind.js +0 -8
- package/packages/config-eslint/_legacy/plugins/no-explicit-type-exports.js +0 -7
- package/packages/config-eslint/_legacy/plugins/no-loops.js +0 -7
- package/packages/config-eslint/_legacy/plugins/no-secrets.js +0 -12
- package/packages/config-eslint/_legacy/plugins/no-use-extend-native.js +0 -5
- package/packages/config-eslint/_legacy/plugins/node.js +0 -5
- package/packages/config-eslint/_legacy/plugins/prettier.js +0 -24
- package/packages/config-eslint/_legacy/plugins/promise.js +0 -10
- package/packages/config-eslint/_legacy/plugins/regexp.js +0 -7
- package/packages/config-eslint/_legacy/plugins/security.js +0 -10
- package/packages/config-eslint/_legacy/plugins/simple-import-sort.js +0 -7
- package/packages/config-eslint/_legacy/plugins/sonar.js +0 -5
- package/packages/config-eslint/_legacy/plugins/sort-class-members.js +0 -298
- package/packages/config-eslint/_legacy/plugins/sort-destructure-keys.js +0 -10
- package/packages/config-eslint/_legacy/plugins/sort-keys-fix.js +0 -7
- package/packages/config-eslint/_legacy/plugins/spellcheck.js +0 -9
- package/packages/config-eslint/_legacy/plugins/sql.js +0 -26
- package/packages/config-eslint/_legacy/plugins/tanstack-query.js +0 -4
- package/packages/config-eslint/_legacy/plugins/testing-library.js +0 -9
- package/packages/config-eslint/_legacy/plugins/typescript-sort-keys.js +0 -5
- package/packages/config-eslint/_legacy/plugins/typescript.js +0 -157
- package/packages/config-eslint/_legacy/plugins/unicorn.js +0 -70
- package/packages/config-eslint/_legacy/plugins/unused-imports.js +0 -17
- package/packages/config-eslint/_legacy/plugins/vitest.js +0 -16
- package/packages/config-eslint/_legacy/plugins/vue-i18n.js +0 -34
- package/packages/config-eslint/_legacy/plugins/vue.js +0 -291
- package/packages/config-eslint/_legacy/plugins/vuejs-accessibility.js +0 -20
- package/packages/config-eslint/_legacy/plugins/wc.js +0 -5
- package/packages/config-eslint/_legacy/plugins/write-good-comments.js +0 -7
- package/packages/config-eslint/_legacy/utils/create-config.js +0 -377
- package/packages/config-eslint/_legacy/utils/extend-spell-checker.js +0 -23
|
@@ -5,254 +5,267 @@ import typescript from 'typescript-eslint';
|
|
|
5
5
|
import { DATA_FILES, TEST_FILES, VUE_FILES } from '../base.js';
|
|
6
6
|
import { NO_RESTRICTED_SYNTAX } from '../rules/restricted-syntax.js';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Правила для Vue.js.
|
|
10
|
+
*
|
|
11
|
+
* @returns {import('eslint').Linter.Config[]}
|
|
12
|
+
*
|
|
13
|
+
* @see [eslint-plugin-vue](https://eslint.vuejs.org/rules/)
|
|
14
|
+
*/
|
|
15
|
+
export const vue = () =>
|
|
16
|
+
defineConfig([
|
|
17
|
+
...plugin.configs['flat/recommended'].map((config) => ({
|
|
18
|
+
...config,
|
|
19
|
+
ignores: [...(config.ignores ?? []), ...DATA_FILES],
|
|
20
|
+
})),
|
|
14
21
|
|
|
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
|
-
'error',
|
|
56
|
-
'PascalCase',
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
'error',
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
22
|
+
{
|
|
23
|
+
files: VUE_FILES,
|
|
24
|
+
languageOptions: { parserOptions: { parser: typescript.parser } },
|
|
25
|
+
rules: {
|
|
26
|
+
'@typescript-eslint/no-empty-object-type': [
|
|
27
|
+
'error',
|
|
28
|
+
{ allowWithName: 'Props$' },
|
|
29
|
+
],
|
|
30
|
+
'no-restricted-syntax': [
|
|
31
|
+
'error',
|
|
32
|
+
// Merge the shared list, do not replace it
|
|
33
|
+
...NO_RESTRICTED_SYNTAX,
|
|
34
|
+
{
|
|
35
|
+
message:
|
|
36
|
+
'Запрещено использовать имя "Props". Используйте именованный формат, например: <ИмяКомпонента>Props.',
|
|
37
|
+
selector:
|
|
38
|
+
"TSInterfaceDeclaration[id.name='Props'], TSTypeAliasDeclaration[id.name='Props']",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
message:
|
|
42
|
+
'При вызове useRoute() переменная должна называться строго "$route" (const $route = useRoute()).',
|
|
43
|
+
selector:
|
|
44
|
+
'VariableDeclarator[init.callee.name="useRoute"][id.name!="$route"]',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
message:
|
|
48
|
+
'При вызове useRouter() переменная должна называться строго "$router" (const $router = useRouter()).',
|
|
49
|
+
selector:
|
|
50
|
+
'VariableDeclarator[init.callee.name="useRouter"][id.name!="$router"]',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
'vue/attributes-order': ['error', { alphabetical: true }],
|
|
54
|
+
'vue/block-lang': [
|
|
55
|
+
'error',
|
|
56
|
+
{ script: { lang: 'ts' }, style: {}, template: {} },
|
|
57
|
+
],
|
|
58
|
+
'vue/block-order': [
|
|
59
|
+
'error',
|
|
60
|
+
{ order: ['script', 'template', 'style'] },
|
|
61
|
+
],
|
|
62
|
+
'vue/component-api-style': ['error', ['script-setup']],
|
|
63
|
+
'vue/component-definition-name-casing': ['error', 'PascalCase'],
|
|
64
|
+
'vue/component-name-in-template-casing': [
|
|
65
|
+
'error',
|
|
66
|
+
'PascalCase',
|
|
67
|
+
{
|
|
68
|
+
ignores: [String.raw`/^[A-Z][a-zA-Z]*\.[A-Z][a-zA-Z]*$/`],
|
|
69
|
+
registeredComponentsOnly: false,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
'vue/component-options-name-casing': ['error', 'PascalCase'],
|
|
73
|
+
'vue/custom-event-name-casing': ['error', 'camelCase', { ignores: [] }],
|
|
74
|
+
'vue/define-emits-declaration': ['error'],
|
|
75
|
+
'vue/define-macros-order': [
|
|
76
|
+
'error',
|
|
77
|
+
{
|
|
78
|
+
defineExposeLast: true,
|
|
79
|
+
order: [
|
|
80
|
+
'definePageMeta', // nuxt
|
|
71
81
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
'defineProps',
|
|
83
|
+
'defineModel',
|
|
84
|
+
'defineEmits',
|
|
85
|
+
'defineOptions',
|
|
86
|
+
'defineSlots',
|
|
77
87
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
// nuxt (can use props)
|
|
89
|
+
'createUseAsyncData',
|
|
90
|
+
'createUseFetch',
|
|
81
91
|
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
'onPrehydrate',
|
|
93
|
+
// /nuxt (can use props)
|
|
84
94
|
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
'
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
'
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
'
|
|
228
|
-
'
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
95
|
+
// nuxi-ui
|
|
96
|
+
'defineLocale',
|
|
97
|
+
'defineShortcuts',
|
|
98
|
+
'extendLocale',
|
|
99
|
+
'extractShortcuts',
|
|
100
|
+
// /nuxi-ui
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
'vue/define-props-declaration': ['error'],
|
|
105
|
+
'vue/define-props-destructuring': [
|
|
106
|
+
'warn',
|
|
107
|
+
{ destructure: 'only-when-assigned' },
|
|
108
|
+
],
|
|
109
|
+
'vue/dot-notation': ['error'],
|
|
110
|
+
'vue/enforce-style-attribute': ['error', { allow: ['scoped'] }],
|
|
111
|
+
'vue/eqeqeq': ['error'],
|
|
112
|
+
'vue/html-button-has-type': ['error'],
|
|
113
|
+
'vue/html-comment-content-newline': ['warn'],
|
|
114
|
+
'vue/html-comment-content-spacing': ['warn'],
|
|
115
|
+
'vue/html-comment-indent': ['warn'],
|
|
116
|
+
'vue/html-end-tags': ['error'],
|
|
117
|
+
'vue/html-self-closing': [
|
|
118
|
+
'error',
|
|
119
|
+
{
|
|
120
|
+
html: { component: 'always', normal: 'never', void: 'always' },
|
|
121
|
+
math: 'always',
|
|
122
|
+
svg: 'always',
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
// Keep in sync with `unicorn/filename-case` in `unicorn.js`:
|
|
126
|
+
// components live in kebab-case files, so the component name is
|
|
127
|
+
// derived from a kebab-case file name instead of being required to be
|
|
128
|
+
// PascalCase in the file name itself.
|
|
129
|
+
'vue/match-component-file-name': [
|
|
130
|
+
'error',
|
|
131
|
+
{ extensions: ['vue'], shouldMatchCase: false },
|
|
132
|
+
],
|
|
133
|
+
'vue/match-component-import-name': ['error'],
|
|
134
|
+
'vue/max-attributes-per-line': ['error', { singleline: 3 }],
|
|
135
|
+
'vue/max-lines-per-block': [
|
|
136
|
+
'warn',
|
|
137
|
+
{ script: 500, skipBlankLines: true, style: 500, template: 500 },
|
|
138
|
+
],
|
|
139
|
+
'vue/new-line-between-multi-line-property': 'off',
|
|
140
|
+
'vue/next-tick-style': ['error', 'promise'],
|
|
141
|
+
'vue/no-child-content': ['error'],
|
|
142
|
+
'vue/no-console': ['error'],
|
|
143
|
+
'vue/no-custom-modifiers-on-v-model': 'off',
|
|
144
|
+
'vue/no-deprecated-delete-set': ['error'],
|
|
145
|
+
'vue/no-deprecated-model-definition': ['error'],
|
|
146
|
+
'vue/no-deprecated-scope-attribute': ['error'],
|
|
147
|
+
'vue/no-deprecated-slot-attribute': ['error'],
|
|
148
|
+
'vue/no-deprecated-slot-scope-attribute': ['error'],
|
|
149
|
+
'vue/no-duplicate-attr-inheritance': ['error'],
|
|
150
|
+
'vue/no-duplicate-class-names': ['error'],
|
|
151
|
+
'vue/no-empty-component-block': ['error'],
|
|
152
|
+
'vue/no-import-compiler-macros': ['error'],
|
|
153
|
+
'vue/no-irregular-whitespace': ['error'],
|
|
154
|
+
'vue/no-loss-of-precision': ['error'],
|
|
155
|
+
'vue/no-multiple-objects-in-class': ['error'],
|
|
156
|
+
'vue/no-multiple-template-root': 'off',
|
|
157
|
+
'vue/no-negated-condition': ['error'],
|
|
158
|
+
'vue/no-negated-v-if-condition': ['error'],
|
|
159
|
+
'vue/no-parsing-error': ['error'],
|
|
160
|
+
'vue/no-potential-component-option-typo': ['error'],
|
|
161
|
+
'vue/no-ref-object-reactivity-loss': ['error'],
|
|
162
|
+
'vue/no-required-prop-with-default': ['error', { autofix: true }],
|
|
163
|
+
'vue/no-reserved-component-names': [
|
|
164
|
+
'error',
|
|
165
|
+
{
|
|
166
|
+
disallowVue3BuiltInComponents: true,
|
|
167
|
+
disallowVueBuiltInComponents: true,
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
'vue/no-restricted-component-names': ['error'],
|
|
171
|
+
'vue/no-restricted-component-options': ['error'],
|
|
172
|
+
'vue/no-restricted-props': ['error'],
|
|
173
|
+
'vue/no-root-v-if': ['error'],
|
|
174
|
+
'vue/no-setup-props-reactivity-loss': ['error'],
|
|
175
|
+
'vue/no-shadow-native-events': ['error'],
|
|
176
|
+
'vue/no-static-inline-styles': ['error', { allowBinding: true }],
|
|
177
|
+
'vue/no-this-in-before-route-enter': ['error'],
|
|
178
|
+
'vue/no-undef-components': ['error'],
|
|
179
|
+
'vue/no-undef-directives': ['error'],
|
|
180
|
+
'vue/no-unsupported-features': ['error'],
|
|
181
|
+
'vue/no-unused-components': ['error'],
|
|
182
|
+
'vue/no-unused-emit-declarations': ['error'],
|
|
183
|
+
'vue/no-unused-properties': [
|
|
184
|
+
'error',
|
|
185
|
+
{ groups: ['inject', 'props', 'asyncData', 'computed', 'methods'] },
|
|
186
|
+
],
|
|
187
|
+
'vue/no-unused-refs': ['error'],
|
|
188
|
+
'vue/no-use-computed-property-like-method': ['error'],
|
|
189
|
+
'vue/no-use-v-else-with-v-for': ['warn'],
|
|
190
|
+
'vue/no-use-v-if-with-v-for': [
|
|
191
|
+
'warn',
|
|
192
|
+
{ allowUsingIterationVar: true },
|
|
193
|
+
],
|
|
194
|
+
'vue/no-useless-mustaches': ['error'],
|
|
195
|
+
'vue/no-useless-template-attributes': ['error'],
|
|
196
|
+
'vue/no-useless-v-bind': ['error'],
|
|
197
|
+
'vue/no-v-for-template-key': 'off',
|
|
198
|
+
'vue/no-v-html': ['error', { ignorePattern: '^html' }],
|
|
199
|
+
'vue/no-v-model-argument': 'off',
|
|
200
|
+
'vue/no-v-text': ['error'],
|
|
201
|
+
'vue/no-v-text-v-html-on-component': ['error'],
|
|
202
|
+
'vue/object-shorthand': ['error'],
|
|
203
|
+
'vue/order-in-components': 'off',
|
|
204
|
+
'vue/padding-line-between-blocks': ['error'],
|
|
205
|
+
'vue/padding-line-between-tags': [
|
|
206
|
+
'error',
|
|
207
|
+
[{ blankLine: 'always', next: '*', prev: '*' }],
|
|
208
|
+
],
|
|
209
|
+
'vue/padding-lines-in-component-definition': [
|
|
210
|
+
'error',
|
|
211
|
+
{ groupSingleLineProperties: true },
|
|
212
|
+
],
|
|
213
|
+
'vue/prefer-define-options': ['error'],
|
|
214
|
+
'vue/prefer-prop-type-boolean-first': ['error'],
|
|
215
|
+
'vue/prefer-separate-static-class': ['error'],
|
|
216
|
+
'vue/prefer-single-event-payload': ['error'],
|
|
217
|
+
'vue/prefer-true-attribute-shorthand': ['error'],
|
|
218
|
+
'vue/prefer-use-template-ref': ['error'],
|
|
219
|
+
'vue/prefer-v-model': ['error'],
|
|
220
|
+
'vue/quote-props': ['error', 'as-needed'],
|
|
221
|
+
'vue/require-direct-export': 'off',
|
|
222
|
+
'vue/require-explicit-slots': ['warn'],
|
|
223
|
+
'vue/require-macro-variable-name': [
|
|
224
|
+
'error',
|
|
225
|
+
{
|
|
226
|
+
defineEmits: '$emit',
|
|
227
|
+
defineProps: '$props',
|
|
228
|
+
defineSlots: '$slots',
|
|
229
|
+
useAttrs: '$attrs',
|
|
230
|
+
useSlots: '$slots',
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
'vue/require-typed-object-prop': ['error'],
|
|
234
|
+
'vue/require-typed-ref': ['error'],
|
|
235
|
+
'vue/slot-name-casing': ['error', 'kebab-case'],
|
|
236
|
+
'vue/sort-keys': 'off',
|
|
237
|
+
'vue/static-class-names-order': ['warn'],
|
|
238
|
+
'vue/this-in-template': ['error', 'never'],
|
|
239
|
+
'vue/v-bind-style': [
|
|
240
|
+
'error',
|
|
241
|
+
'shorthand',
|
|
242
|
+
{ sameNameShorthand: 'always' },
|
|
243
|
+
],
|
|
244
|
+
'vue/v-for-delimiter-style': ['error'],
|
|
245
|
+
'vue/v-if-else-key': ['error'],
|
|
246
|
+
'vue/v-on-event-hyphenation': ['error'],
|
|
247
|
+
'vue/v-on-handler-style': ['error', 'inline-function'],
|
|
248
|
+
'vue/valid-define-options': ['error'],
|
|
249
|
+
'vue/valid-next-tick': ['error'],
|
|
250
|
+
'vue/valid-v-bind-sync': ['error'],
|
|
251
|
+
'vue/valid-v-slot': ['error'],
|
|
252
|
+
},
|
|
239
253
|
},
|
|
240
|
-
},
|
|
241
254
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
255
|
+
{
|
|
256
|
+
files: ['**/*.ts', '**/*.js', '**/*.cjs', '**/*.mjs'],
|
|
257
|
+
rules: { 'vue/order-in-components': 'off' },
|
|
258
|
+
},
|
|
246
259
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
260
|
+
{
|
|
261
|
+
files: [
|
|
262
|
+
'**/app/*.vue',
|
|
263
|
+
'**/src/*.vue',
|
|
264
|
+
'**/layouts/**/*.vue',
|
|
265
|
+
'**/pages/**/*.vue',
|
|
266
|
+
],
|
|
267
|
+
rules: { 'vue/multi-word-component-names': 'off' },
|
|
268
|
+
},
|
|
256
269
|
|
|
257
|
-
|
|
258
|
-
]);
|
|
270
|
+
{ files: TEST_FILES, rules: { 'vue/one-component-per-file': 'off' } },
|
|
271
|
+
]);
|
|
@@ -3,14 +3,21 @@ import { defineConfig } from 'eslint/config';
|
|
|
3
3
|
|
|
4
4
|
import { FILES } from '../base.js';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Правила для Zod-схем.
|
|
8
|
+
*
|
|
9
|
+
* @returns {import('eslint').Linter.Config[]}
|
|
10
|
+
*
|
|
11
|
+
* @see [eslint-plugin-zod](https://github.com/marcalexiei/eslint-zod/tree/main/plugins/eslint-plugin-zod)
|
|
12
|
+
*/
|
|
13
|
+
export const zod = () =>
|
|
14
|
+
defineConfig([
|
|
15
|
+
{
|
|
16
|
+
...plugin.configs.recommended,
|
|
17
|
+
files: FILES,
|
|
18
|
+
rules: {
|
|
19
|
+
...plugin.configs.recommended.rules,
|
|
20
|
+
'zod/consistent-import': ['error', { syntax: 'named' }],
|
|
21
|
+
},
|
|
14
22
|
},
|
|
15
|
-
|
|
16
|
-
]);
|
|
23
|
+
]);
|