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