@shayanthenerd/eslint-config 0.13.1 → 0.14.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 CHANGED
@@ -194,9 +194,10 @@ Install VS Code extensions for [ESLint](https://marketplace.visualstudio.com/ite
194
194
  "source.fixAll.oxc": "explicit",
195
195
  "source.fixAll.eslint": "explicit"
196
196
  },
197
- "eslint.run": "onSave",
198
- "oxc.lint.run": "onSave",
197
+ "oxc.lint.run": "onSave",
198
+ "eslint.run": "onSave",
199
199
  "editor.formatOnSave": true,
200
+ "eslint.format.enable": true,
200
201
 
201
202
  /* Format and lint JavaScript, TypeScript, HTML, and Vue files with ESLint, while everything else is formatted with Prettier. */
202
203
  "editor.defaultFormatter": "esbenp.prettier-vscode",
@@ -515,9 +516,8 @@ Under this policy, minor updates may introduce new linting errors, which could b
515
516
  You can find a list of all available versions and their changelogs on the [releases page](https://github.com/ShayanTheNerd/eslint-config/releases).
516
517
 
517
518
  ## Roadmap to v1.0.0
518
- - [ ] Integrate additional ESLint plugins, such as [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn), [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n), and [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc).
519
- - [ ] Add support for other frameworks and file types, including Astro, React, Next.js, MDX, Markdown, and JSON.
520
- - [ ] Reduce bundle size by dynamically (programmatically) installing dependencies as needed.
519
+ - [ ] Integrate additional ESLint plugins such as [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn), [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n), [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc), etc.
520
+ - [ ] Add support for other frameworks and file types, including Astro, React, Next.js, MDX, Markdown, JSON, etc.
521
521
  - [ ] Develop a starter wizard to automate the setup of OXLint, ESLint, Prettier, and other configurations.
522
522
 
523
523
  ## Contribution Guide
@@ -0,0 +1,21 @@
1
+ import { globs } from "../utils/globs.mjs";
2
+ import { isEnabled } from "../utils/isEnabled.mjs";
3
+ import { defaultOptions } from "../utils/options/defaultOptions.mjs";
4
+ import { getZodRules } from "../rules/zod.mjs";
5
+ import { mergeConfigs } from "eslint-flat-config-utils";
6
+ import eslintPluginZodX from "eslint-plugin-zod-x";
7
+
8
+ //#region src/configs/zod.ts
9
+ function getZodConfig(options) {
10
+ const { zod, vue } = options.configs;
11
+ const { overrides } = isEnabled(zod) ? zod : defaultOptions.configs.zod;
12
+ return mergeConfigs({
13
+ name: "shayanthenerd/zod",
14
+ files: isEnabled(vue) ? [globs.src, globs.vue] : [globs.src],
15
+ plugins: { "zod-x": eslintPluginZodX },
16
+ rules: getZodRules()
17
+ }, overrides);
18
+ }
19
+
20
+ //#endregion
21
+ export { getZodConfig };
package/dist/index.mjs CHANGED
@@ -2,6 +2,7 @@ import { isEnabled } from "./utils/isEnabled.mjs";
2
2
  import { defaultOptions } from "./utils/options/defaultOptions.mjs";
3
3
  import { getCSSConfig } from "./configs/css.mjs";
4
4
  import { getVueConfig } from "./configs/vue.mjs";
5
+ import { getZodConfig } from "./configs/zod.mjs";
5
6
  import { getBaseConfig } from "./configs/base.mjs";
6
7
  import { getHTMLConfig } from "./configs/html.mjs";
7
8
  import { getVitestConfig } from "./configs/vitest.mjs";
@@ -34,7 +35,7 @@ import path from "node:path";
34
35
  */
35
36
  function defineConfig(options = {}, ...configs) {
36
37
  const mergedOptions = mergeWithDefaults(options);
37
- const { gitignore, global: { rules, ignores, settings, linterOptions }, configs: { vue, css, nuxt, html, oxlint, importX, tailwind, stylistic, typescript, perfectionist, base: { preferNamedExports }, test: { vitest, cypress, storybook, playwright } } } = mergedOptions;
38
+ const { gitignore, global: { rules, ignores, settings, linterOptions }, configs: { css, zod, vue, html, nuxt, oxlint, importX, tailwind, stylistic, typescript, perfectionist, base: { preferNamedExports }, test: { vitest, cypress, storybook, playwright } } } = mergedOptions;
38
39
  const ignorePatterns = getIgnorePatterns({
39
40
  gitignore,
40
41
  patterns: ignores
@@ -57,6 +58,7 @@ function defineConfig(options = {}, ...configs) {
57
58
  preferNamedExports && getRestrictedExports(),
58
59
  isEnabled(stylistic) && getStylisticConfig(mergedOptions),
59
60
  isEnabled(perfectionist) && getPerfectionistConfig(mergedOptions),
61
+ isEnabled(zod) && getZodConfig(mergedOptions),
60
62
  isEnabled(tailwind) && getTailwindConfig(mergedOptions),
61
63
  isEnabled(vue) && getVueConfig(mergedOptions),
62
64
  isEnabled(vue) && getVueComponentNamesConfig(),
@@ -52,10 +52,14 @@
52
52
  "eslint/no-ternary": "off",
53
53
  "eslint/no-undefined": "off",
54
54
  "eslint/sort-imports": "off",
55
+ "eslint/max-statements": "off",
55
56
  "eslint/no-else-return": "off",
56
- "eslint/no-magic-numbers": "off",
57
57
  "eslint/arrow-body-style": "off",
58
+ "eslint/no-magic-numbers": "off",
59
+ "eslint/no-inline-comments": "off",
60
+ "eslint/capitalized-comments": "off",
58
61
  "eslint/func-names": ["error", "as-needed"],
62
+ "no-sequences": ["error", { "allowInParentheses": false }],
59
63
  "eslint/no-plusplus": ["warn", { "allowForLoopAfterthoughts": true }],
60
64
  "eslint/no-unused-vars": ["error", { "ignoreUsingDeclarations": true }],
61
65
  "eslint/no-duplicate-imports": ["error", { "allowSeparateTypeImports": true }],
@@ -95,6 +99,7 @@
95
99
  "unicorn/no-array-for-each": "off",
96
100
  "unicorn/prefer-global-this": "off",
97
101
  "unicorn/no-useless-undefined": "off",
102
+ "unicorn/no-immediate-mutation": "warn",
98
103
  "unicorn/prefer-prototype-methods": "off",
99
104
  "unicorn/no-await-expression-member": "off",
100
105
 
@@ -29,7 +29,10 @@ function getStylisticRules(options) {
29
29
  "@stylistic/indent": [
30
30
  "warn",
31
31
  useTabs ? "tab" : indent,
32
- { tabLength: indent }
32
+ {
33
+ tabLength: indent,
34
+ SwitchCase: 1
35
+ }
33
36
  ],
34
37
  "@stylistic/indent-binary-ops": ["warn", useTabs ? "tab" : indent],
35
38
  "@stylistic/jsx-closing-bracket-location": "warn",
@@ -167,9 +170,10 @@ function getStylisticRules(options) {
167
170
  },
168
171
  {
169
172
  prev: [
170
- "const",
173
+ "var",
171
174
  "let",
172
- "var"
175
+ "const",
176
+ "using"
173
177
  ],
174
178
  next: "block-like",
175
179
  blankLine: "any"
@@ -178,6 +182,11 @@ function getStylisticRules(options) {
178
182
  prev: "block-like",
179
183
  next: "*",
180
184
  blankLine: "always"
185
+ },
186
+ {
187
+ prev: ["case", "default"],
188
+ next: ["case", "default"],
189
+ blankLine: "any"
181
190
  }
182
191
  ],
183
192
  "@stylistic/quote-props": ["warn", "consistent-as-needed"],
@@ -133,7 +133,10 @@ function getTypeScriptRules(options) {
133
133
  "@typescript-eslint/no-unsafe-type-assertion": "warn",
134
134
  "@typescript-eslint/prefer-enum-initializers": "error",
135
135
  "@typescript-eslint/no-unnecessary-qualifier": "warn",
136
- "@typescript-eslint/switch-exhaustiveness-check": "warn",
136
+ "@typescript-eslint/switch-exhaustiveness-check": ["warn", {
137
+ requireDefaultForNonUnion: true,
138
+ considerDefaultExhaustiveForUnions: true
139
+ }],
137
140
  "@typescript-eslint/explicit-module-boundary-types": "warn",
138
141
  "@typescript-eslint/no-unused-private-class-members": "error",
139
142
  "@typescript-eslint/no-unnecessary-parameter-property-assignment": "warn",
@@ -26,6 +26,7 @@ function getVitestRules(options) {
26
26
  "vitest/no-standalone-expect": "error",
27
27
  "vitest/no-test-prefixes": "error",
28
28
  "vitest/no-test-return-statement": "error",
29
+ "vitest/no-unneeded-async-expect-function": "warn",
29
30
  "vitest/padding-around-after-all-blocks": "warn",
30
31
  "vitest/padding-around-after-each-blocks": "warn",
31
32
  "vitest/padding-around-before-all-blocks": "warn",
@@ -33,6 +34,7 @@ function getVitestRules(options) {
33
34
  "vitest/padding-around-describe-blocks": "warn",
34
35
  "vitest/prefer-called-exactly-once-with": "warn",
35
36
  "vitest/prefer-called-once": "warn",
37
+ "vitest/prefer-called-times": "warn",
36
38
  "vitest/prefer-called-with": "warn",
37
39
  "vitest/prefer-comparison-matcher": "warn",
38
40
  "vitest/prefer-each": "warn",
@@ -45,6 +47,7 @@ function getVitestRules(options) {
45
47
  "vitest/prefer-importing-vitest-globals": "warn",
46
48
  "vitest/prefer-lowercase-title": "warn",
47
49
  "vitest/prefer-mock-promise-shorthand": "warn",
50
+ "vitest/prefer-mock-return-shorthand": "warn",
48
51
  "vitest/prefer-snapshot-hint": ["warn", "always"],
49
52
  "vitest/prefer-spy-on": "warn",
50
53
  "vitest/prefer-strict-boolean-matchers": "warn",
@@ -54,6 +57,7 @@ function getVitestRules(options) {
54
57
  "vitest/prefer-to-be-object": "warn",
55
58
  "vitest/prefer-to-be-truthy": "warn",
56
59
  "vitest/prefer-to-contain": "warn",
60
+ "vitest/prefer-to-have-been-called-times": "warn",
57
61
  "vitest/prefer-to-have-length": "warn",
58
62
  "vitest/prefer-todo": "warn",
59
63
  "vitest/prefer-vi-mocked": "warn",
@@ -0,0 +1,20 @@
1
+ //#region src/rules/zod.ts
2
+ function getZodRules() {
3
+ return {
4
+ "zod-x/array-style": "warn",
5
+ "zod-x/no-any-schema": "error",
6
+ "zod-x/no-empty-custom-schema": "error",
7
+ "zod-x/no-number-schema-with-int": "warn",
8
+ "zod-x/no-optional-and-default-together": ["warn", { preferredMethod: "default" }],
9
+ "zod-x/no-throw-in-refine": "error",
10
+ "zod-x/prefer-meta": "warn",
11
+ "zod-x/prefer-meta-last": "warn",
12
+ "zod-x/prefer-namespace-import": "error",
13
+ "zod-x/require-brand-type-parameter": "error",
14
+ "zod-x/require-error-message": "warn",
15
+ "zod-x/require-schema-suffix": "warn"
16
+ };
17
+ }
18
+
19
+ //#endregion
20
+ export { getZodRules };
@@ -21,6 +21,7 @@ declare module 'eslint-flat-config-utils' {
21
21
  'shayanthenerd/restricted-exports'?: true;
22
22
  'shayanthenerd/stylistic'?: true;
23
23
  'shayanthenerd/perfectionist'?: true;
24
+ 'shayanthenerd/zod'?: true;
24
25
  'shayanthenerd/tailwind'?: true;
25
26
  'shayanthenerd/vue > setup'?: true;
26
27
  'shayanthenerd/vue'?: true;
@@ -42,6 +43,11 @@ interface ESLintSchema {
42
43
  * @see https://html-eslint.org/docs/rules/attrs-newline
43
44
  */
44
45
  '@html-eslint/attrs-newline'?: Linter.RuleEntry<HtmlEslintAttrsNewline>;
46
+ /**
47
+ * Disallow extra spacing in class attribute values
48
+ * @see https://html-eslint.org/docs/rules/class-spacing
49
+ */
50
+ '@html-eslint/class-spacing'?: Linter.RuleEntry<[]>;
45
51
  /**
46
52
  * Enforce newline between elements.
47
53
  * @see https://html-eslint.org/docs/rules/element-newline
@@ -165,6 +171,11 @@ interface ESLintSchema {
165
171
  * @see https://html-eslint.org/docs/rules/no-non-scalable-viewport
166
172
  */
167
173
  '@html-eslint/no-non-scalable-viewport'?: Linter.RuleEntry<[]>;
174
+ /**
175
+ * Disallow use of obsolete attributes in HTML5
176
+ * @see https://html-eslint.org/docs/rules/no-obsolete-attrs
177
+ */
178
+ '@html-eslint/no-obsolete-attrs'?: Linter.RuleEntry<[]>;
168
179
  /**
169
180
  * Disallow use of obsolete elements in HTML5
170
181
  * @see https://html-eslint.org/docs/rules/no-obsolete-tags
@@ -4042,6 +4053,11 @@ interface ESLintSchema {
4042
4053
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
4043
4054
  */
4044
4055
  'vitest/no-test-return-statement'?: Linter.RuleEntry<[]>;
4056
+ /**
4057
+ * Disallow unnecessary async function wrapper for expected promises
4058
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-unneeded-async-expect-function.md
4059
+ */
4060
+ 'vitest/no-unneeded-async-expect-function'?: Linter.RuleEntry<[]>;
4045
4061
  /**
4046
4062
  * Enforce padding around `afterAll` blocks
4047
4063
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-all-blocks.md
@@ -4151,7 +4167,7 @@ interface ESLintSchema {
4151
4167
  * prefer dynamic import in mock
4152
4168
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
4153
4169
  */
4154
- 'vitest/prefer-import-in-mock'?: Linter.RuleEntry<[]>;
4170
+ 'vitest/prefer-import-in-mock'?: Linter.RuleEntry<VitestPreferImportInMock>;
4155
4171
  /**
4156
4172
  * enforce importing Vitest globals
4157
4173
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
@@ -4167,6 +4183,11 @@ interface ESLintSchema {
4167
4183
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
4168
4184
  */
4169
4185
  'vitest/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]>;
4186
+ /**
4187
+ * Prefer mock return shorthands
4188
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md
4189
+ */
4190
+ 'vitest/prefer-mock-return-shorthand'?: Linter.RuleEntry<[]>;
4170
4191
  /**
4171
4192
  * enforce including a hint with external snapshots
4172
4193
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
@@ -4212,6 +4233,11 @@ interface ESLintSchema {
4212
4233
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md
4213
4234
  */
4214
4235
  'vitest/prefer-to-contain'?: Linter.RuleEntry<[]>;
4236
+ /**
4237
+ * Suggest using `toHaveBeenCalledTimes()`
4238
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-been-called-times.md
4239
+ */
4240
+ 'vitest/prefer-to-have-been-called-times'?: Linter.RuleEntry<[]>;
4215
4241
  /**
4216
4242
  * enforce using toHaveLength()
4217
4243
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
@@ -4237,11 +4263,6 @@ interface ESLintSchema {
4237
4263
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
4238
4264
  */
4239
4265
  'vitest/require-hook'?: Linter.RuleEntry<VitestRequireHook>;
4240
- /**
4241
- * require usage of import in vi.mock()
4242
- * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-import-vi-mock.md
4243
- */
4244
- 'vitest/require-import-vi-mock'?: Linter.RuleEntry<[]>;
4245
4266
  /**
4246
4267
  * require local Test Context for concurrent snapshot tests
4247
4268
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
@@ -5647,6 +5668,86 @@ interface ESLintSchema {
5647
5668
  * @see https://eslint.org/docs/latest/rules/yoda
5648
5669
  */
5649
5670
  'yoda'?: Linter.RuleEntry<Yoda>;
5671
+ /**
5672
+ * Enforce consistent Zod array style
5673
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/array-style.md
5674
+ */
5675
+ 'zod-x/array-style'?: Linter.RuleEntry<ZodXArrayStyle>;
5676
+ /**
5677
+ * Enforce consistent source from Zod imports
5678
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/consistent-import-source.md
5679
+ */
5680
+ 'zod-x/consistent-import-source'?: Linter.RuleEntry<ZodXConsistentImportSource>;
5681
+ /**
5682
+ * Enforce consistent usage of Zod schema methods
5683
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/consistent-object-schema-type.md
5684
+ */
5685
+ 'zod-x/consistent-object-schema-type'?: Linter.RuleEntry<ZodXConsistentObjectSchemaType>;
5686
+ /**
5687
+ * Disallow usage of `z.any()` in Zod schemas
5688
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/no-any-schema.md
5689
+ */
5690
+ 'zod-x/no-any-schema'?: Linter.RuleEntry<[]>;
5691
+ /**
5692
+ * Disallow usage of `z.custom()` without arguments
5693
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/no-empty-custom-schema.md
5694
+ */
5695
+ 'zod-x/no-empty-custom-schema'?: Linter.RuleEntry<[]>;
5696
+ /**
5697
+ * Disallow usage of `z.number().int()` as it is considered legacy
5698
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/no-number-schema-with-int.md
5699
+ */
5700
+ 'zod-x/no-number-schema-with-int'?: Linter.RuleEntry<[]>;
5701
+ /**
5702
+ * Disallow using both `.optional()` and `.default()` on the same Zod schema
5703
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/no-optional-and-default-together.md
5704
+ */
5705
+ 'zod-x/no-optional-and-default-together'?: Linter.RuleEntry<ZodXNoOptionalAndDefaultTogether>;
5706
+ /**
5707
+ * Disallow throwing errors directly inside Zod refine callbacks
5708
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/no-throw-in-refine.md
5709
+ */
5710
+ 'zod-x/no-throw-in-refine'?: Linter.RuleEntry<[]>;
5711
+ /**
5712
+ * Disallow usage of `z.unknown()` in Zod schemas
5713
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/no-unknown-schema.md
5714
+ */
5715
+ 'zod-x/no-unknown-schema'?: Linter.RuleEntry<[]>;
5716
+ /**
5717
+ * Enforce usage of `.meta()` over `.describe()`
5718
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/prefer-meta.md
5719
+ */
5720
+ 'zod-x/prefer-meta'?: Linter.RuleEntry<[]>;
5721
+ /**
5722
+ * Enforce `.meta()` as last method
5723
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/prefer-meta-last.md
5724
+ */
5725
+ 'zod-x/prefer-meta-last'?: Linter.RuleEntry<[]>;
5726
+ /**
5727
+ * Enforce importing zod as a namespace import (`import * as z from 'zod'`)
5728
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/prefer-namespace-import.md
5729
+ */
5730
+ 'zod-x/prefer-namespace-import'?: Linter.RuleEntry<[]>;
5731
+ /**
5732
+ * Require type parameter on `.brand()` functions
5733
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/require-brand-type-parameter.md
5734
+ */
5735
+ 'zod-x/require-brand-type-parameter'?: Linter.RuleEntry<[]>;
5736
+ /**
5737
+ * Enforce that custom refinements include an error message
5738
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/require-error-message.md
5739
+ */
5740
+ 'zod-x/require-error-message'?: Linter.RuleEntry<[]>;
5741
+ /**
5742
+ * Require schema suffix when declaring a Zod schema
5743
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/require-schema-suffix.md
5744
+ */
5745
+ 'zod-x/require-schema-suffix'?: Linter.RuleEntry<ZodXRequireSchemaSuffix>;
5746
+ /**
5747
+ * Enforce consistent style for error messages in Zod schema validation (using ESQuery patterns)
5748
+ * @see https://github.com/marcalexiei/eslint-plugin-zod-x/blob/HEAD/docs/rules/schema-error-property-style.md
5749
+ */
5750
+ 'zod-x/schema-error-property-style'?: Linter.RuleEntry<ZodXSchemaErrorPropertyStyle>;
5650
5751
  }
5651
5752
  /* ======= Declarations ======= */
5652
5753
  // ----- @html-eslint/attrs-newline -----
@@ -10406,7 +10507,7 @@ type PerfectionistSortArrayIncludes = {
10406
10507
  };
10407
10508
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10408
10509
  groupName: string;
10409
- newlinesInside?: number;
10510
+ newlinesInside?: ("ignore" | number);
10410
10511
  order?: ("asc" | "desc");
10411
10512
  anyOf: {
10412
10513
  elementNamePattern?: (({
@@ -10425,7 +10526,7 @@ type PerfectionistSortArrayIncludes = {
10425
10526
  };
10426
10527
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10427
10528
  groupName: string;
10428
- newlinesInside?: number;
10529
+ newlinesInside?: ("ignore" | number);
10429
10530
  order?: ("asc" | "desc");
10430
10531
  elementNamePattern?: (({
10431
10532
  pattern: string;
@@ -10436,13 +10537,14 @@ type PerfectionistSortArrayIncludes = {
10436
10537
  } | string));
10437
10538
  selector?: ("literal" | "spread");
10438
10539
  })[];
10540
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
10439
10541
  groups?: (string | [string, ...(string)[]] | {
10440
10542
  newlinesBetween: ("ignore" | number);
10441
10543
  } | {
10442
10544
  group: (string | [string, ...(string)[]]);
10443
10545
  commentAbove?: string;
10444
10546
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10445
- newlinesInside?: number;
10547
+ newlinesInside?: ("ignore" | number);
10446
10548
  order?: ("asc" | "desc");
10447
10549
  })[];
10448
10550
  newlinesBetween?: ("ignore" | number);
@@ -10498,7 +10600,7 @@ type PerfectionistSortClasses = [] | [{
10498
10600
  };
10499
10601
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10500
10602
  groupName: string;
10501
- newlinesInside?: number;
10603
+ newlinesInside?: ("ignore" | number);
10502
10604
  order?: ("asc" | "desc");
10503
10605
  anyOf: {
10504
10606
  elementNamePattern?: (({
@@ -10532,7 +10634,7 @@ type PerfectionistSortClasses = [] | [{
10532
10634
  };
10533
10635
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10534
10636
  groupName: string;
10535
- newlinesInside?: number;
10637
+ newlinesInside?: ("ignore" | number);
10536
10638
  order?: ("asc" | "desc");
10537
10639
  elementNamePattern?: (({
10538
10640
  pattern: string;
@@ -10558,13 +10660,14 @@ type PerfectionistSortClasses = [] | [{
10558
10660
  flags?: string;
10559
10661
  } | string));
10560
10662
  })[];
10663
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
10561
10664
  groups?: (string | [string, ...(string)[]] | {
10562
10665
  newlinesBetween: ("ignore" | number);
10563
10666
  } | {
10564
10667
  group: (string | [string, ...(string)[]]);
10565
10668
  commentAbove?: string;
10566
10669
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10567
- newlinesInside?: number;
10670
+ newlinesInside?: ("ignore" | number);
10568
10671
  order?: ("asc" | "desc");
10569
10672
  })[];
10570
10673
  newlinesBetween?: ("ignore" | number);
@@ -10618,7 +10721,7 @@ type PerfectionistSortDecorators = {
10618
10721
  };
10619
10722
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10620
10723
  groupName: string;
10621
- newlinesInside?: number;
10724
+ newlinesInside?: ("ignore" | number);
10622
10725
  order?: ("asc" | "desc");
10623
10726
  anyOf: {
10624
10727
  elementNamePattern?: (({
@@ -10636,7 +10739,7 @@ type PerfectionistSortDecorators = {
10636
10739
  };
10637
10740
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10638
10741
  groupName: string;
10639
- newlinesInside?: number;
10742
+ newlinesInside?: ("ignore" | number);
10640
10743
  order?: ("asc" | "desc");
10641
10744
  elementNamePattern?: (({
10642
10745
  pattern: string;
@@ -10646,13 +10749,14 @@ type PerfectionistSortDecorators = {
10646
10749
  flags?: string;
10647
10750
  } | string));
10648
10751
  })[];
10752
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
10649
10753
  groups?: (string | [string, ...(string)[]] | {
10650
10754
  newlinesBetween: ("ignore" | number);
10651
10755
  } | {
10652
10756
  group: (string | [string, ...(string)[]]);
10653
10757
  commentAbove?: string;
10654
10758
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10655
- newlinesInside?: number;
10759
+ newlinesInside?: ("ignore" | number);
10656
10760
  order?: ("asc" | "desc");
10657
10761
  })[];
10658
10762
  newlinesBetween?: ("ignore" | number);
@@ -10704,7 +10808,7 @@ type PerfectionistSortEnums = [] | [{
10704
10808
  };
10705
10809
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10706
10810
  groupName: string;
10707
- newlinesInside?: number;
10811
+ newlinesInside?: ("ignore" | number);
10708
10812
  order?: ("asc" | "desc");
10709
10813
  anyOf: {
10710
10814
  elementNamePattern?: (({
@@ -10729,7 +10833,7 @@ type PerfectionistSortEnums = [] | [{
10729
10833
  };
10730
10834
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10731
10835
  groupName: string;
10732
- newlinesInside?: number;
10836
+ newlinesInside?: ("ignore" | number);
10733
10837
  order?: ("asc" | "desc");
10734
10838
  elementNamePattern?: (({
10735
10839
  pattern: string;
@@ -10746,13 +10850,14 @@ type PerfectionistSortEnums = [] | [{
10746
10850
  flags?: string;
10747
10851
  } | string));
10748
10852
  })[];
10853
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
10749
10854
  groups?: (string | [string, ...(string)[]] | {
10750
10855
  newlinesBetween: ("ignore" | number);
10751
10856
  } | {
10752
10857
  group: (string | [string, ...(string)[]]);
10753
10858
  commentAbove?: string;
10754
10859
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10755
- newlinesInside?: number;
10860
+ newlinesInside?: ("ignore" | number);
10756
10861
  order?: ("asc" | "desc");
10757
10862
  })[];
10758
10863
  newlinesBetween?: ("ignore" | number);
@@ -10800,7 +10905,7 @@ type PerfectionistSortExportAttributes = {
10800
10905
  };
10801
10906
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10802
10907
  groupName: string;
10803
- newlinesInside?: number;
10908
+ newlinesInside?: ("ignore" | number);
10804
10909
  order?: ("asc" | "desc");
10805
10910
  anyOf: {
10806
10911
  elementNamePattern?: (({
@@ -10818,7 +10923,7 @@ type PerfectionistSortExportAttributes = {
10818
10923
  };
10819
10924
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10820
10925
  groupName: string;
10821
- newlinesInside?: number;
10926
+ newlinesInside?: ("ignore" | number);
10822
10927
  order?: ("asc" | "desc");
10823
10928
  elementNamePattern?: (({
10824
10929
  pattern: string;
@@ -10828,13 +10933,14 @@ type PerfectionistSortExportAttributes = {
10828
10933
  flags?: string;
10829
10934
  } | string));
10830
10935
  })[];
10936
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
10831
10937
  groups?: (string | [string, ...(string)[]] | {
10832
10938
  newlinesBetween: ("ignore" | number);
10833
10939
  } | {
10834
10940
  group: (string | [string, ...(string)[]]);
10835
10941
  commentAbove?: string;
10836
10942
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10837
- newlinesInside?: number;
10943
+ newlinesInside?: ("ignore" | number);
10838
10944
  order?: ("asc" | "desc");
10839
10945
  })[];
10840
10946
  newlinesBetween?: ("ignore" | number);
@@ -10881,7 +10987,7 @@ type PerfectionistSortExports = {
10881
10987
  };
10882
10988
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10883
10989
  groupName: string;
10884
- newlinesInside?: number;
10990
+ newlinesInside?: ("ignore" | number);
10885
10991
  order?: ("asc" | "desc");
10886
10992
  anyOf: {
10887
10993
  elementNamePattern?: (({
@@ -10901,7 +11007,7 @@ type PerfectionistSortExports = {
10901
11007
  };
10902
11008
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10903
11009
  groupName: string;
10904
- newlinesInside?: number;
11010
+ newlinesInside?: ("ignore" | number);
10905
11011
  order?: ("asc" | "desc");
10906
11012
  elementNamePattern?: (({
10907
11013
  pattern: string;
@@ -10913,13 +11019,14 @@ type PerfectionistSortExports = {
10913
11019
  modifiers?: ("value" | "type" | "named" | "wildcard" | "multiline" | "singleline")[];
10914
11020
  selector?: "export";
10915
11021
  })[];
11022
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
10916
11023
  groups?: (string | [string, ...(string)[]] | {
10917
11024
  newlinesBetween: ("ignore" | number);
10918
11025
  } | {
10919
11026
  group: (string | [string, ...(string)[]]);
10920
11027
  commentAbove?: string;
10921
11028
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10922
- newlinesInside?: number;
11029
+ newlinesInside?: ("ignore" | number);
10923
11030
  order?: ("asc" | "desc");
10924
11031
  })[];
10925
11032
  newlinesBetween?: ("ignore" | number);
@@ -10966,7 +11073,7 @@ type PerfectionistSortHeritageClauses = {
10966
11073
  };
10967
11074
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10968
11075
  groupName: string;
10969
- newlinesInside?: number;
11076
+ newlinesInside?: ("ignore" | number);
10970
11077
  order?: ("asc" | "desc");
10971
11078
  anyOf: {
10972
11079
  elementNamePattern?: (({
@@ -10984,7 +11091,7 @@ type PerfectionistSortHeritageClauses = {
10984
11091
  };
10985
11092
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
10986
11093
  groupName: string;
10987
- newlinesInside?: number;
11094
+ newlinesInside?: ("ignore" | number);
10988
11095
  order?: ("asc" | "desc");
10989
11096
  elementNamePattern?: (({
10990
11097
  pattern: string;
@@ -10994,13 +11101,14 @@ type PerfectionistSortHeritageClauses = {
10994
11101
  flags?: string;
10995
11102
  } | string));
10996
11103
  })[];
11104
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
10997
11105
  groups?: (string | [string, ...(string)[]] | {
10998
11106
  newlinesBetween: ("ignore" | number);
10999
11107
  } | {
11000
11108
  group: (string | [string, ...(string)[]]);
11001
11109
  commentAbove?: string;
11002
11110
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11003
- newlinesInside?: number;
11111
+ newlinesInside?: ("ignore" | number);
11004
11112
  order?: ("asc" | "desc");
11005
11113
  })[];
11006
11114
  newlinesBetween?: ("ignore" | number);
@@ -11047,7 +11155,7 @@ type PerfectionistSortImportAttributes = {
11047
11155
  };
11048
11156
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11049
11157
  groupName: string;
11050
- newlinesInside?: number;
11158
+ newlinesInside?: ("ignore" | number);
11051
11159
  order?: ("asc" | "desc");
11052
11160
  anyOf: {
11053
11161
  elementNamePattern?: (({
@@ -11065,7 +11173,7 @@ type PerfectionistSortImportAttributes = {
11065
11173
  };
11066
11174
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11067
11175
  groupName: string;
11068
- newlinesInside?: number;
11176
+ newlinesInside?: ("ignore" | number);
11069
11177
  order?: ("asc" | "desc");
11070
11178
  elementNamePattern?: (({
11071
11179
  pattern: string;
@@ -11075,13 +11183,14 @@ type PerfectionistSortImportAttributes = {
11075
11183
  flags?: string;
11076
11184
  } | string));
11077
11185
  })[];
11186
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
11078
11187
  groups?: (string | [string, ...(string)[]] | {
11079
11188
  newlinesBetween: ("ignore" | number);
11080
11189
  } | {
11081
11190
  group: (string | [string, ...(string)[]]);
11082
11191
  commentAbove?: string;
11083
11192
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11084
- newlinesInside?: number;
11193
+ newlinesInside?: ("ignore" | number);
11085
11194
  order?: ("asc" | "desc");
11086
11195
  })[];
11087
11196
  newlinesBetween?: ("ignore" | number);
@@ -11128,7 +11237,7 @@ type PerfectionistSortImports = {
11128
11237
  };
11129
11238
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "type-import-first");
11130
11239
  groupName: string;
11131
- newlinesInside?: number;
11240
+ newlinesInside?: ("ignore" | number);
11132
11241
  order?: ("asc" | "desc");
11133
11242
  anyOf: {
11134
11243
  elementNamePattern?: (({
@@ -11148,7 +11257,7 @@ type PerfectionistSortImports = {
11148
11257
  };
11149
11258
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "type-import-first");
11150
11259
  groupName: string;
11151
- newlinesInside?: number;
11260
+ newlinesInside?: ("ignore" | number);
11152
11261
  order?: ("asc" | "desc");
11153
11262
  elementNamePattern?: (({
11154
11263
  pattern: string;
@@ -11160,13 +11269,14 @@ type PerfectionistSortImports = {
11160
11269
  modifiers?: ("default" | "multiline" | "named" | "require" | "side-effect" | "singleline" | "ts-equals" | "type" | "value" | "wildcard")[];
11161
11270
  selector?: ("side-effect-style" | "tsconfig-path" | "side-effect" | "external" | "internal" | "builtin" | "sibling" | "subpath" | "import" | "parent" | "index" | "style" | "type");
11162
11271
  })[];
11272
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
11163
11273
  groups?: (string | [string, ...(string)[]] | {
11164
11274
  newlinesBetween: ("ignore" | number);
11165
11275
  } | {
11166
11276
  group: (string | [string, ...(string)[]]);
11167
11277
  commentAbove?: string;
11168
11278
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "type-import-first");
11169
- newlinesInside?: number;
11279
+ newlinesInside?: ("ignore" | number);
11170
11280
  order?: ("asc" | "desc");
11171
11281
  })[];
11172
11282
  newlinesBetween?: ("ignore" | number);
@@ -11229,7 +11339,7 @@ type PerfectionistSortInterfaces = {
11229
11339
  };
11230
11340
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11231
11341
  groupName: string;
11232
- newlinesInside?: number;
11342
+ newlinesInside?: ("ignore" | number);
11233
11343
  order?: ("asc" | "desc");
11234
11344
  anyOf: {
11235
11345
  elementNamePattern?: (({
@@ -11258,7 +11368,7 @@ type PerfectionistSortInterfaces = {
11258
11368
  };
11259
11369
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11260
11370
  groupName: string;
11261
- newlinesInside?: number;
11371
+ newlinesInside?: ("ignore" | number);
11262
11372
  order?: ("asc" | "desc");
11263
11373
  elementNamePattern?: (({
11264
11374
  pattern: string;
@@ -11278,13 +11388,14 @@ type PerfectionistSortInterfaces = {
11278
11388
  } | string));
11279
11389
  sortBy?: ("name" | "value");
11280
11390
  })[];
11391
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
11281
11392
  groups?: (string | [string, ...(string)[]] | {
11282
11393
  newlinesBetween: ("ignore" | number);
11283
11394
  } | {
11284
11395
  group: (string | [string, ...(string)[]]);
11285
11396
  commentAbove?: string;
11286
11397
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11287
- newlinesInside?: number;
11398
+ newlinesInside?: ("ignore" | number);
11288
11399
  order?: ("asc" | "desc");
11289
11400
  })[];
11290
11401
  newlinesBetween?: ("ignore" | number);
@@ -11360,7 +11471,7 @@ type PerfectionistSortIntersectionTypes = {
11360
11471
  };
11361
11472
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11362
11473
  groupName: string;
11363
- newlinesInside?: number;
11474
+ newlinesInside?: ("ignore" | number);
11364
11475
  order?: ("asc" | "desc");
11365
11476
  anyOf: {
11366
11477
  elementNamePattern?: (({
@@ -11379,7 +11490,7 @@ type PerfectionistSortIntersectionTypes = {
11379
11490
  };
11380
11491
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11381
11492
  groupName: string;
11382
- newlinesInside?: number;
11493
+ newlinesInside?: ("ignore" | number);
11383
11494
  order?: ("asc" | "desc");
11384
11495
  elementNamePattern?: (({
11385
11496
  pattern: string;
@@ -11390,13 +11501,14 @@ type PerfectionistSortIntersectionTypes = {
11390
11501
  } | string));
11391
11502
  selector?: ("intersection" | "conditional" | "function" | "operator" | "keyword" | "literal" | "nullish" | "import" | "object" | "named" | "tuple" | "union");
11392
11503
  })[];
11504
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
11393
11505
  groups?: (string | [string, ...(string)[]] | {
11394
11506
  newlinesBetween: ("ignore" | number);
11395
11507
  } | {
11396
11508
  group: (string | [string, ...(string)[]]);
11397
11509
  commentAbove?: string;
11398
11510
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11399
- newlinesInside?: number;
11511
+ newlinesInside?: ("ignore" | number);
11400
11512
  order?: ("asc" | "desc");
11401
11513
  })[];
11402
11514
  newlinesBetween?: ("ignore" | number);
@@ -11443,7 +11555,7 @@ type PerfectionistSortJsxProps = {
11443
11555
  };
11444
11556
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11445
11557
  groupName: string;
11446
- newlinesInside?: number;
11558
+ newlinesInside?: ("ignore" | number);
11447
11559
  order?: ("asc" | "desc");
11448
11560
  anyOf: {
11449
11561
  elementNamePattern?: (({
@@ -11470,7 +11582,7 @@ type PerfectionistSortJsxProps = {
11470
11582
  };
11471
11583
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11472
11584
  groupName: string;
11473
- newlinesInside?: number;
11585
+ newlinesInside?: ("ignore" | number);
11474
11586
  order?: ("asc" | "desc");
11475
11587
  elementNamePattern?: (({
11476
11588
  pattern: string;
@@ -11489,13 +11601,14 @@ type PerfectionistSortJsxProps = {
11489
11601
  flags?: string;
11490
11602
  } | string));
11491
11603
  })[];
11604
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
11492
11605
  groups?: (string | [string, ...(string)[]] | {
11493
11606
  newlinesBetween: ("ignore" | number);
11494
11607
  } | {
11495
11608
  group: (string | [string, ...(string)[]]);
11496
11609
  commentAbove?: string;
11497
11610
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11498
- newlinesInside?: number;
11611
+ newlinesInside?: ("ignore" | number);
11499
11612
  order?: ("asc" | "desc");
11500
11613
  })[];
11501
11614
  newlinesBetween?: ("ignore" | number);
@@ -11536,7 +11649,7 @@ type PerfectionistSortMaps = {
11536
11649
  };
11537
11650
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11538
11651
  groupName: string;
11539
- newlinesInside?: number;
11652
+ newlinesInside?: ("ignore" | number);
11540
11653
  order?: ("asc" | "desc");
11541
11654
  anyOf: {
11542
11655
  elementNamePattern?: (({
@@ -11554,7 +11667,7 @@ type PerfectionistSortMaps = {
11554
11667
  };
11555
11668
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11556
11669
  groupName: string;
11557
- newlinesInside?: number;
11670
+ newlinesInside?: ("ignore" | number);
11558
11671
  order?: ("asc" | "desc");
11559
11672
  elementNamePattern?: (({
11560
11673
  pattern: string;
@@ -11564,13 +11677,14 @@ type PerfectionistSortMaps = {
11564
11677
  flags?: string;
11565
11678
  } | string));
11566
11679
  })[];
11680
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
11567
11681
  groups?: (string | [string, ...(string)[]] | {
11568
11682
  newlinesBetween: ("ignore" | number);
11569
11683
  } | {
11570
11684
  group: (string | [string, ...(string)[]]);
11571
11685
  commentAbove?: string;
11572
11686
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11573
- newlinesInside?: number;
11687
+ newlinesInside?: ("ignore" | number);
11574
11688
  order?: ("asc" | "desc");
11575
11689
  })[];
11576
11690
  newlinesBetween?: ("ignore" | number);
@@ -11626,7 +11740,7 @@ type PerfectionistSortModules = [] | [{
11626
11740
  };
11627
11741
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11628
11742
  groupName: string;
11629
- newlinesInside?: number;
11743
+ newlinesInside?: ("ignore" | number);
11630
11744
  order?: ("asc" | "desc");
11631
11745
  anyOf: {
11632
11746
  elementNamePattern?: (({
@@ -11653,7 +11767,7 @@ type PerfectionistSortModules = [] | [{
11653
11767
  };
11654
11768
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11655
11769
  groupName: string;
11656
- newlinesInside?: number;
11770
+ newlinesInside?: ("ignore" | number);
11657
11771
  order?: ("asc" | "desc");
11658
11772
  elementNamePattern?: (({
11659
11773
  pattern: string;
@@ -11672,13 +11786,14 @@ type PerfectionistSortModules = [] | [{
11672
11786
  flags?: string;
11673
11787
  } | string));
11674
11788
  })[];
11789
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
11675
11790
  groups?: (string | [string, ...(string)[]] | {
11676
11791
  newlinesBetween: ("ignore" | number);
11677
11792
  } | {
11678
11793
  group: (string | [string, ...(string)[]]);
11679
11794
  commentAbove?: string;
11680
11795
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11681
- newlinesInside?: number;
11796
+ newlinesInside?: ("ignore" | number);
11682
11797
  order?: ("asc" | "desc");
11683
11798
  })[];
11684
11799
  newlinesBetween?: ("ignore" | number);
@@ -11725,7 +11840,7 @@ type PerfectionistSortNamedExports = {
11725
11840
  };
11726
11841
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11727
11842
  groupName: string;
11728
- newlinesInside?: number;
11843
+ newlinesInside?: ("ignore" | number);
11729
11844
  order?: ("asc" | "desc");
11730
11845
  anyOf: {
11731
11846
  elementNamePattern?: (({
@@ -11745,7 +11860,7 @@ type PerfectionistSortNamedExports = {
11745
11860
  };
11746
11861
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11747
11862
  groupName: string;
11748
- newlinesInside?: number;
11863
+ newlinesInside?: ("ignore" | number);
11749
11864
  order?: ("asc" | "desc");
11750
11865
  elementNamePattern?: (({
11751
11866
  pattern: string;
@@ -11757,13 +11872,14 @@ type PerfectionistSortNamedExports = {
11757
11872
  modifiers?: ("value" | "type")[];
11758
11873
  selector?: "export";
11759
11874
  })[];
11875
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
11760
11876
  groups?: (string | [string, ...(string)[]] | {
11761
11877
  newlinesBetween: ("ignore" | number);
11762
11878
  } | {
11763
11879
  group: (string | [string, ...(string)[]]);
11764
11880
  commentAbove?: string;
11765
11881
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11766
- newlinesInside?: number;
11882
+ newlinesInside?: ("ignore" | number);
11767
11883
  order?: ("asc" | "desc");
11768
11884
  })[];
11769
11885
  newlinesBetween?: ("ignore" | number);
@@ -11811,7 +11927,7 @@ type PerfectionistSortNamedImports = {
11811
11927
  };
11812
11928
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11813
11929
  groupName: string;
11814
- newlinesInside?: number;
11930
+ newlinesInside?: ("ignore" | number);
11815
11931
  order?: ("asc" | "desc");
11816
11932
  anyOf: {
11817
11933
  elementNamePattern?: (({
@@ -11831,7 +11947,7 @@ type PerfectionistSortNamedImports = {
11831
11947
  };
11832
11948
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11833
11949
  groupName: string;
11834
- newlinesInside?: number;
11950
+ newlinesInside?: ("ignore" | number);
11835
11951
  order?: ("asc" | "desc");
11836
11952
  elementNamePattern?: (({
11837
11953
  pattern: string;
@@ -11843,13 +11959,14 @@ type PerfectionistSortNamedImports = {
11843
11959
  modifiers?: ("value" | "type")[];
11844
11960
  selector?: "import";
11845
11961
  })[];
11962
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
11846
11963
  groups?: (string | [string, ...(string)[]] | {
11847
11964
  newlinesBetween: ("ignore" | number);
11848
11965
  } | {
11849
11966
  group: (string | [string, ...(string)[]]);
11850
11967
  commentAbove?: string;
11851
11968
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11852
- newlinesInside?: number;
11969
+ newlinesInside?: ("ignore" | number);
11853
11970
  order?: ("asc" | "desc");
11854
11971
  })[];
11855
11972
  newlinesBetween?: ("ignore" | number);
@@ -11899,7 +12016,7 @@ type PerfectionistSortObjectTypes = {
11899
12016
  };
11900
12017
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11901
12018
  groupName: string;
11902
- newlinesInside?: number;
12019
+ newlinesInside?: ("ignore" | number);
11903
12020
  order?: ("asc" | "desc");
11904
12021
  anyOf: {
11905
12022
  elementNamePattern?: (({
@@ -11928,7 +12045,7 @@ type PerfectionistSortObjectTypes = {
11928
12045
  };
11929
12046
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11930
12047
  groupName: string;
11931
- newlinesInside?: number;
12048
+ newlinesInside?: ("ignore" | number);
11932
12049
  order?: ("asc" | "desc");
11933
12050
  elementNamePattern?: (({
11934
12051
  pattern: string;
@@ -11948,13 +12065,14 @@ type PerfectionistSortObjectTypes = {
11948
12065
  } | string));
11949
12066
  sortBy?: ("name" | "value");
11950
12067
  })[];
12068
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
11951
12069
  groups?: (string | [string, ...(string)[]] | {
11952
12070
  newlinesBetween: ("ignore" | number);
11953
12071
  } | {
11954
12072
  group: (string | [string, ...(string)[]]);
11955
12073
  commentAbove?: string;
11956
12074
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
11957
- newlinesInside?: number;
12075
+ newlinesInside?: ("ignore" | number);
11958
12076
  order?: ("asc" | "desc");
11959
12077
  })[];
11960
12078
  newlinesBetween?: ("ignore" | number);
@@ -12030,7 +12148,7 @@ type PerfectionistSortObjects = {
12030
12148
  };
12031
12149
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12032
12150
  groupName: string;
12033
- newlinesInside?: number;
12151
+ newlinesInside?: ("ignore" | number);
12034
12152
  order?: ("asc" | "desc");
12035
12153
  anyOf: {
12036
12154
  elementNamePattern?: (({
@@ -12057,7 +12175,7 @@ type PerfectionistSortObjects = {
12057
12175
  };
12058
12176
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12059
12177
  groupName: string;
12060
- newlinesInside?: number;
12178
+ newlinesInside?: ("ignore" | number);
12061
12179
  order?: ("asc" | "desc");
12062
12180
  elementNamePattern?: (({
12063
12181
  pattern: string;
@@ -12076,13 +12194,14 @@ type PerfectionistSortObjects = {
12076
12194
  flags?: string;
12077
12195
  } | string));
12078
12196
  })[];
12197
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
12079
12198
  groups?: (string | [string, ...(string)[]] | {
12080
12199
  newlinesBetween: ("ignore" | number);
12081
12200
  } | {
12082
12201
  group: (string | [string, ...(string)[]]);
12083
12202
  commentAbove?: string;
12084
12203
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12085
- newlinesInside?: number;
12204
+ newlinesInside?: ("ignore" | number);
12086
12205
  order?: ("asc" | "desc");
12087
12206
  })[];
12088
12207
  newlinesBetween?: ("ignore" | number);
@@ -12168,7 +12287,7 @@ type PerfectionistSortSets = {
12168
12287
  };
12169
12288
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12170
12289
  groupName: string;
12171
- newlinesInside?: number;
12290
+ newlinesInside?: ("ignore" | number);
12172
12291
  order?: ("asc" | "desc");
12173
12292
  anyOf: {
12174
12293
  elementNamePattern?: (({
@@ -12187,7 +12306,7 @@ type PerfectionistSortSets = {
12187
12306
  };
12188
12307
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12189
12308
  groupName: string;
12190
- newlinesInside?: number;
12309
+ newlinesInside?: ("ignore" | number);
12191
12310
  order?: ("asc" | "desc");
12192
12311
  elementNamePattern?: (({
12193
12312
  pattern: string;
@@ -12198,13 +12317,14 @@ type PerfectionistSortSets = {
12198
12317
  } | string));
12199
12318
  selector?: ("literal" | "spread");
12200
12319
  })[];
12320
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
12201
12321
  groups?: (string | [string, ...(string)[]] | {
12202
12322
  newlinesBetween: ("ignore" | number);
12203
12323
  } | {
12204
12324
  group: (string | [string, ...(string)[]]);
12205
12325
  commentAbove?: string;
12206
12326
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12207
- newlinesInside?: number;
12327
+ newlinesInside?: ("ignore" | number);
12208
12328
  order?: ("asc" | "desc");
12209
12329
  })[];
12210
12330
  newlinesBetween?: ("ignore" | number);
@@ -12273,7 +12393,7 @@ type PerfectionistSortUnionTypes = {
12273
12393
  };
12274
12394
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12275
12395
  groupName: string;
12276
- newlinesInside?: number;
12396
+ newlinesInside?: ("ignore" | number);
12277
12397
  order?: ("asc" | "desc");
12278
12398
  anyOf: {
12279
12399
  elementNamePattern?: (({
@@ -12292,7 +12412,7 @@ type PerfectionistSortUnionTypes = {
12292
12412
  };
12293
12413
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12294
12414
  groupName: string;
12295
- newlinesInside?: number;
12415
+ newlinesInside?: ("ignore" | number);
12296
12416
  order?: ("asc" | "desc");
12297
12417
  elementNamePattern?: (({
12298
12418
  pattern: string;
@@ -12303,13 +12423,14 @@ type PerfectionistSortUnionTypes = {
12303
12423
  } | string));
12304
12424
  selector?: ("intersection" | "conditional" | "function" | "operator" | "keyword" | "literal" | "nullish" | "import" | "object" | "named" | "tuple" | "union");
12305
12425
  })[];
12426
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
12306
12427
  groups?: (string | [string, ...(string)[]] | {
12307
12428
  newlinesBetween: ("ignore" | number);
12308
12429
  } | {
12309
12430
  group: (string | [string, ...(string)[]]);
12310
12431
  commentAbove?: string;
12311
12432
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12312
- newlinesInside?: number;
12433
+ newlinesInside?: ("ignore" | number);
12313
12434
  order?: ("asc" | "desc");
12314
12435
  })[];
12315
12436
  newlinesBetween?: ("ignore" | number);
@@ -12356,7 +12477,7 @@ type PerfectionistSortVariableDeclarations = [] | [{
12356
12477
  };
12357
12478
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12358
12479
  groupName: string;
12359
- newlinesInside?: number;
12480
+ newlinesInside?: ("ignore" | number);
12360
12481
  order?: ("asc" | "desc");
12361
12482
  anyOf: {
12362
12483
  elementNamePattern?: (({
@@ -12375,7 +12496,7 @@ type PerfectionistSortVariableDeclarations = [] | [{
12375
12496
  };
12376
12497
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12377
12498
  groupName: string;
12378
- newlinesInside?: number;
12499
+ newlinesInside?: ("ignore" | number);
12379
12500
  order?: ("asc" | "desc");
12380
12501
  elementNamePattern?: (({
12381
12502
  pattern: string;
@@ -12386,13 +12507,14 @@ type PerfectionistSortVariableDeclarations = [] | [{
12386
12507
  } | string));
12387
12508
  selector?: ("initialized" | "uninitialized");
12388
12509
  })[];
12510
+ newlinesInside?: (("ignore" | number) | "newlinesBetween");
12389
12511
  groups?: (string | [string, ...(string)[]] | {
12390
12512
  newlinesBetween: ("ignore" | number);
12391
12513
  } | {
12392
12514
  group: (string | [string, ...(string)[]]);
12393
12515
  commentAbove?: string;
12394
12516
  type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted");
12395
- newlinesInside?: number;
12517
+ newlinesInside?: ("ignore" | number);
12396
12518
  order?: ("asc" | "desc");
12397
12519
  })[];
12398
12520
  newlinesBetween?: ("ignore" | number);
@@ -12781,6 +12903,10 @@ type VitestPreferExpectAssertions = [] | [{
12781
12903
  onlyFunctionsWithExpectInLoop?: boolean;
12782
12904
  onlyFunctionsWithExpectInCallback?: boolean;
12783
12905
  }];
12906
+ // ----- vitest/prefer-import-in-mock -----
12907
+ type VitestPreferImportInMock = [] | [{
12908
+ fixable?: boolean;
12909
+ }];
12784
12910
  // ----- vitest/prefer-lowercase-title -----
12785
12911
  type VitestPreferLowercaseTitle = [] | [{
12786
12912
  ignore?: ("describe" | "test" | "it")[];
@@ -14161,5 +14287,30 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
14161
14287
  exceptRange?: boolean;
14162
14288
  onlyEquality?: boolean;
14163
14289
  }];
14290
+ // ----- zod-x/array-style -----
14291
+ type ZodXArrayStyle = [] | [{
14292
+ style?: ("function" | "method");
14293
+ }];
14294
+ // ----- zod-x/consistent-import-source -----
14295
+ type ZodXConsistentImportSource = [] | [{
14296
+ sources?: [("zod" | "zod/mini" | "zod/v4" | "zod/v4-mini" | "zod/v3"), ...(("zod" | "zod/mini" | "zod/v4" | "zod/v4-mini" | "zod/v3"))[]];
14297
+ }];
14298
+ // ----- zod-x/consistent-object-schema-type -----
14299
+ type ZodXConsistentObjectSchemaType = [] | [{
14300
+ allow?: [("object" | "looseObject" | "strictObject"), ...(("object" | "looseObject" | "strictObject"))[]];
14301
+ }];
14302
+ // ----- zod-x/no-optional-and-default-together -----
14303
+ type ZodXNoOptionalAndDefaultTogether = [] | [{
14304
+ preferredMethod?: ("none" | "default" | "optional");
14305
+ }];
14306
+ // ----- zod-x/require-schema-suffix -----
14307
+ type ZodXRequireSchemaSuffix = [] | [{
14308
+ suffix?: string;
14309
+ }];
14310
+ // ----- zod-x/schema-error-property-style -----
14311
+ type ZodXSchemaErrorPropertyStyle = [] | [{
14312
+ selector?: string;
14313
+ example?: string;
14314
+ }];
14164
14315
  //#endregion
14165
14316
  export { ESLintSchema };
@@ -319,7 +319,7 @@ interface Options {
319
319
  typescript?: boolean | TypeScriptOptions;
320
320
 
321
321
  /**
322
- * Use [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x) to organize imports and exports, and detect related issues.
322
+ * Use [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x) and [eslint-plugin-unused-imports](https://github.com/sweepline/eslint-plugin-unused-imports) to organize imports and exports, and detect related issues.
323
323
  *
324
324
  * @default true
325
325
  */
@@ -332,6 +332,13 @@ interface Options {
332
332
  */
333
333
  perfectionist?: boolean | PerfectionistOptions;
334
334
 
335
+ /**
336
+ * Use [eslint-plugin-zod-x](https://github.com/marcalexiei/eslint-plugin-zod-x) to enforce Zod best practices.
337
+ *
338
+ * @default false // `true` if "zod" is detected in the package.json file when `autoDetectDeps` is enabled
339
+ */
340
+ zod?: boolean | ConfigWithOverrides;
341
+
335
342
  /**
336
343
  * Use [eslint-plugin-vue](https://eslint.vuejs.org) to enforce Vue best practices, accessibility guidelines, stylistic rules, and identify mistakes.
337
344
  *
@@ -6,14 +6,16 @@ import { isPackageExists } from "local-pkg";
6
6
  //#region src/utils/isPackageDetected.ts
7
7
  const detectedPackages = [];
8
8
  function logDetectedPackages() {
9
- if (detectedPackages.length > 0) console.info(styleText("green", "✔"), "Automatic dependency detection enabled ESLint configurations for", detectedPackages.map((packageName) => styleText("blue", packageName)).join(", "));
9
+ if (detectedPackages.length > 0) {
10
+ detectedPackages.sort();
11
+ console.info(styleText("green", "✔"), "Automatic dependency detection enabled ESLint configurations for", detectedPackages.map((packageName) => styleText("blue", packageName)).join(", "));
12
+ }
10
13
  }
11
14
  function isPackageDetected(packageName, options = defaultOptions) {
12
15
  const { packageDir = defaultOptions.packageDir, autoDetectDeps = defaultOptions.autoDetectDeps } = options;
13
16
  if (!autoDetectDeps) return false;
14
17
  const isPackageInstalled = isPackageExists(packageName, { paths: [path.resolve(packageDir)] });
15
18
  if (isPackageInstalled) detectedPackages.push(packageName);
16
- detectedPackages.sort();
17
19
  return isPackageInstalled;
18
20
  }
19
21
 
@@ -80,6 +80,7 @@ const defaultOptions = {
80
80
  sortType: "line-length",
81
81
  overrides: {}
82
82
  },
83
+ zod: { overrides: {} },
83
84
  vue: {
84
85
  accessibility: {
85
86
  imageComponents: ["NuxtImg"],
@@ -14,6 +14,7 @@ function enableDetectedConfigs(options) {
14
14
  options.configs.vue ??= isPackageDetected("vue", options);
15
15
  options.configs.nuxt ??= isPackageDetected("nuxt", options);
16
16
  options.configs.typescript ??= isPackageDetected("typescript", options);
17
+ options.configs.zod ??= isPackageDetected("zod", options);
17
18
  options.configs.test.vitest ??= isPackageDetected("vitest", options);
18
19
  options.configs.test.cypress ??= isPackageDetected("cypress", options);
19
20
  options.configs.test.storybook ??= isPackageDetected("storybook", options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shayanthenerd/eslint-config",
3
- "version": "0.13.1",
3
+ "version": "0.14.0",
4
4
  "license": "MIT",
5
5
  "description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
6
6
  "keywords": [
@@ -54,7 +54,7 @@
54
54
  "version": "^22.12.0",
55
55
  "onfail": "download"
56
56
  },
57
- "packageManager": "pnpm@10.25.0",
57
+ "packageManager": "pnpm@10.26.2",
58
58
  "scripts": {
59
59
  "prepare": "pnpm git:gitmessage && simple-git-hooks && pnpm generate:types",
60
60
  "prepublishOnly": "pnpm build:package",
@@ -84,9 +84,9 @@
84
84
  "dependencies": {
85
85
  "@eslint/compat": "2.0.0",
86
86
  "@eslint/css": "0.14.1",
87
- "@html-eslint/eslint-plugin": "0.51.0",
87
+ "@html-eslint/eslint-plugin": "0.52.0",
88
88
  "@stylistic/eslint-plugin": "5.6.1",
89
- "@vitest/eslint-plugin": "1.5.2",
89
+ "@vitest/eslint-plugin": "1.6.4",
90
90
  "defu": "6.1.4",
91
91
  "eslint": "9.39.2",
92
92
  "eslint-flat-config-utils": "2.1.4",
@@ -94,31 +94,32 @@
94
94
  "eslint-plugin-better-tailwindcss": "3.8.0",
95
95
  "eslint-plugin-cypress": "5.2.0",
96
96
  "eslint-plugin-import-x": "4.16.1",
97
- "eslint-plugin-oxlint": "1.33.0",
98
- "eslint-plugin-perfectionist": "5.0.0",
97
+ "eslint-plugin-oxlint": "1.36.0",
98
+ "eslint-plugin-perfectionist": "5.1.0",
99
99
  "eslint-plugin-playwright": "2.4.0",
100
- "eslint-plugin-storybook": "10.1.10",
100
+ "eslint-plugin-storybook": "10.1.11",
101
101
  "eslint-plugin-unused-imports": "4.3.0",
102
102
  "eslint-plugin-vue": "10.6.2",
103
103
  "eslint-plugin-vuejs-accessibility": "2.4.1",
104
+ "eslint-plugin-zod-x": "2.0.0",
104
105
  "globals": "16.5.0",
105
106
  "local-pkg": "1.1.2",
106
- "oxlint": "1.33.0",
107
+ "oxlint": "1.36.0",
107
108
  "tailwind-csstree": "0.1.4",
108
- "typescript-eslint": "8.50.0"
109
+ "typescript-eslint": "8.51.0"
109
110
  },
110
111
  "devDependencies": {
111
112
  "@arethetypeswrong/cli": "0.18.2",
112
113
  "@eslint/config-inspector": "1.4.2",
113
114
  "@types/node": "25.0.3",
114
- "actions-up": "1.7.0",
115
+ "actions-up": "1.8.0",
115
116
  "eslint-typegen": "2.3.0",
116
117
  "nano-staged": "0.9.0",
117
118
  "prettier": "3.7.4",
118
119
  "publint": "0.3.16",
119
120
  "serve": "14.2.5",
120
121
  "simple-git-hooks": "2.13.1",
121
- "tsdown": "0.18.1",
122
+ "tsdown": "0.18.3",
122
123
  "typescript": "5.9.3",
123
124
  "unplugin-unused": "0.5.6"
124
125
  }