From 1a44da3b6f680104db33d935cbd30a992b7495ad Mon Sep 17 00:00:00 2001 From: "bfra-me[bot]" <118100583+bfra-me[bot]@users.noreply.github.com> Date: Sun, 24 Nov 2024 19:15:53 -0700 Subject: [PATCH] fix(deps): update dependency eslint-plugin-perfectionist to v4 (#642) Co-authored-by: bfra-me[bot] <118100583+bfra-me[bot]@users.noreply.github.com> --- .changeset/renovate-d92f109.md | 5 + packages/eslint-config/package.json | 2 +- packages/eslint-config/src/configs/imports.ts | 2 +- packages/eslint-config/src/configs/jsdoc.ts | 6 +- .../eslint-config/src/configs/typescript.ts | 2 +- packages/eslint-config/src/rules.d.ts | 525 ++++++++++-------- pnpm-lock.yaml | 37 +- 7 files changed, 322 insertions(+), 257 deletions(-) create mode 100644 .changeset/renovate-d92f109.md diff --git a/.changeset/renovate-d92f109.md b/.changeset/renovate-d92f109.md new file mode 100644 index 00000000..1f0b40cb --- /dev/null +++ b/.changeset/renovate-d92f109.md @@ -0,0 +1,5 @@ +--- +'@bfra.me/eslint-config': patch +--- + +Updated dependency `eslint-plugin-perfectionist` to `4.0.3`. diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index a62dc9ae..102ce779 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -51,7 +51,7 @@ "eslint-plugin-command": "0.2.6", "eslint-plugin-import-x": "4.4.3", "eslint-plugin-jsdoc": "50.5.0", - "eslint-plugin-perfectionist": "3.9.1", + "eslint-plugin-perfectionist": "4.0.3", "eslint-plugin-unused-imports": "4.1.4", "globals": "15.12.0", "is-in-ci": "1.0.0", diff --git a/packages/eslint-config/src/configs/imports.ts b/packages/eslint-config/src/configs/imports.ts index ec2b838f..a97e932c 100644 --- a/packages/eslint-config/src/configs/imports.ts +++ b/packages/eslint-config/src/configs/imports.ts @@ -9,10 +9,10 @@ export async function imports(): Promise { 'import-x': pluginImportX as any, }, rules: { + 'import-x/no-named-default': 'error', 'import-x/first': 'error', 'import-x/no-duplicates': 'error', 'import-x/no-mutable-exports': 'error', - 'import-x/no-named-default': 'error', 'import-x/no-self-import': 'error', 'import-x/no-useless-path-segments': 'error', 'import-x/no-webpack-loader-syntax': 'error', diff --git a/packages/eslint-config/src/configs/jsdoc.ts b/packages/eslint-config/src/configs/jsdoc.ts index 8187e8fa..169c606b 100644 --- a/packages/eslint-config/src/configs/jsdoc.ts +++ b/packages/eslint-config/src/configs/jsdoc.ts @@ -7,18 +7,18 @@ export async function jsdoc(): Promise { name: '@bfra.me/jsdoc', plugins: {jsdoc: _jsdoc}, rules: { - 'jsdoc/check-access': 'warn', 'jsdoc/check-param-names': 'warn', 'jsdoc/check-property-names': 'warn', + 'jsdoc/require-param-name': 'warn', + 'jsdoc/require-property-name': 'warn', + 'jsdoc/check-access': 'warn', 'jsdoc/check-types': 'warn', 'jsdoc/empty-tags': 'warn', 'jsdoc/implements-on-classes': 'warn', 'jsdoc/no-defaults': 'warn', 'jsdoc/no-multi-asterisks': 'warn', - 'jsdoc/require-param-name': 'warn', 'jsdoc/require-property': 'warn', 'jsdoc/require-property-description': 'warn', - 'jsdoc/require-property-name': 'warn', 'jsdoc/require-returns-check': 'warn', 'jsdoc/require-returns-description': 'warn', 'jsdoc/require-yields-check': 'warn', diff --git a/packages/eslint-config/src/configs/typescript.ts b/packages/eslint-config/src/configs/typescript.ts index c657c623..ad37e1bf 100644 --- a/packages/eslint-config/src/configs/typescript.ts +++ b/packages/eslint-config/src/configs/typescript.ts @@ -102,6 +102,7 @@ export async function typescript(options: TypeScriptOptions = {}): Promise - /** - * Enforce sorted Astro attributes. - * @see https://perfectionist.dev/rules/sort-astro-attributes - * @deprecated - */ - 'perfectionist/sort-astro-attributes'?: Linter.RuleEntry /** * Enforce sorted classes. * @see https://perfectionist.dev/rules/sort-classes */ 'perfectionist/sort-classes'?: Linter.RuleEntry + /** + * Enforce sorted decorators. + * @see https://perfectionist.dev/rules/sort-decorators + */ + 'perfectionist/sort-decorators'?: Linter.RuleEntry /** * Enforce sorted TypeScript enums. * @see https://perfectionist.dev/rules/sort-enums @@ -2536,6 +2535,11 @@ export interface Rules { * @see https://perfectionist.dev/rules/sort-exports */ 'perfectionist/sort-exports'?: Linter.RuleEntry + /** + * Enforce sorted heritage clauses. + * @see https://perfectionist.dev/rules/sort-heritage-clauses + */ + 'perfectionist/sort-heritage-clauses'?: Linter.RuleEntry /** * Enforce sorted imports. * @see https://perfectionist.dev/rules/sort-imports @@ -2561,6 +2565,11 @@ export interface Rules { * @see https://perfectionist.dev/rules/sort-maps */ 'perfectionist/sort-maps'?: Linter.RuleEntry + /** + * Enforce sorted modules. + * @see https://perfectionist.dev/rules/sort-modules + */ + 'perfectionist/sort-modules'?: Linter.RuleEntry /** * Enforce sorted named exports. * @see https://perfectionist.dev/rules/sort-named-exports @@ -2586,12 +2595,6 @@ export interface Rules { * @see https://perfectionist.dev/rules/sort-sets */ 'perfectionist/sort-sets'?: Linter.RuleEntry - /** - * Enforce sorted Svelte attributes. - * @see https://perfectionist.dev/rules/sort-svelte-attributes - * @deprecated - */ - 'perfectionist/sort-svelte-attributes'?: Linter.RuleEntry /** * Enforce sorted switch cases. * @see https://perfectionist.dev/rules/sort-switch-case @@ -2607,12 +2610,6 @@ export interface Rules { * @see https://perfectionist.dev/rules/sort-variable-declarations */ 'perfectionist/sort-variable-declarations'?: Linter.RuleEntry - /** - * Enforce sorted Vue attributes. - * @see https://perfectionist.dev/rules/sort-vue-attributes - * @deprecated - */ - 'perfectionist/sort-vue-attributes'?: Linter.RuleEntry /** * Require using arrow functions for callbacks * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback @@ -6289,61 +6286,26 @@ type PaddingLineBetweenStatements = { // ----- perfectionist/sort-array-includes ----- type PerfectionistSortArrayIncludes = []|[{ - type?: ("alphabetical" | "natural" | "line-length") - - order?: ("asc" | "desc") - - matcher?: ("minimatch" | "regex") - - ignoreCase?: boolean - - specialCharacters?: ("remove" | "trim" | "keep") + partitionByComment?: (string[] | boolean | string) groupKind?: ("mixed" | "literals-first" | "spreads-first") - partitionByComment?: (string[] | boolean | string) - partitionByNewLine?: boolean -}] -// ----- perfectionist/sort-astro-attributes ----- -type PerfectionistSortAstroAttributes = []|[{ - type?: ("alphabetical" | "natural" | "line-length") - - order?: ("asc" | "desc") - - matcher?: ("minimatch" | "regex") + specialCharacters?: ("remove" | "trim" | "keep") ignoreCase?: boolean - specialCharacters?: ("remove" | "trim" | "keep") + locales?: (string | string[]) - groups?: (string | string[])[] + order?: ("asc" | "desc") - customGroups?: { - [k: string]: (string | string[]) | undefined - } + type?: ("alphabetical" | "natural" | "line-length") }] // ----- perfectionist/sort-classes ----- type PerfectionistSortClasses = []|[{ - type?: ("alphabetical" | "natural" | "line-length") - - order?: ("asc" | "desc") - - matcher?: ("minimatch" | "regex") - - ignoreCase?: boolean - - specialCharacters?: ("remove" | "trim" | "keep") - - partitionByComment?: (string[] | boolean | string) - - groups?: (string | string[])[] - customGroups?: ({ - [k: string]: (string | string[]) | undefined - } | ({ groupName?: string @@ -6352,15 +6314,15 @@ type PerfectionistSortClasses = []|[{ order?: ("desc" | "asc") anyOf?: { - selector?: ("accessor-property" | "index-signature" | "constructor" | "static-block" | "get-method" | "set-method" | "function-property" | "property" | "method") - - modifiers?: ("protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[] - - elementNamePattern?: string + modifiers?: ("async" | "protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[] elementValuePattern?: string decoratorNamePattern?: string + + selector?: ("accessor-property" | "index-signature" | "constructor" | "static-block" | "get-method" | "set-method" | "function-property" | "property" | "method") + + elementNamePattern?: string }[] } | { @@ -6370,91 +6332,169 @@ type PerfectionistSortClasses = []|[{ order?: ("desc" | "asc") - selector?: ("accessor-property" | "index-signature" | "constructor" | "static-block" | "get-method" | "set-method" | "function-property" | "property" | "method") - - modifiers?: ("protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[] - - elementNamePattern?: string + modifiers?: ("async" | "protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[] elementValuePattern?: string decoratorNamePattern?: string - })[]) -}] -// ----- perfectionist/sort-enums ----- -type PerfectionistSortEnums = []|[{ + + selector?: ("accessor-property" | "index-signature" | "constructor" | "static-block" | "get-method" | "set-method" | "function-property" | "property" | "method") + + elementNamePattern?: string + })[] - type?: ("alphabetical" | "natural" | "line-length") + ignoreCallbackDependenciesPatterns?: string[] - order?: ("asc" | "desc") + partitionByComment?: (string[] | boolean | string) + + partitionByNewLine?: boolean - matcher?: ("minimatch" | "regex") + specialCharacters?: ("remove" | "trim" | "keep") + + newlinesBetween?: ("ignore" | "always" | "never") ignoreCase?: boolean - specialCharacters?: ("remove" | "trim" | "keep") + locales?: (string | string[]) - sortByValue?: boolean + groups?: (string | string[])[] - forceNumericSort?: boolean + order?: ("asc" | "desc") + + type?: ("alphabetical" | "natural" | "line-length") +}] +// ----- perfectionist/sort-decorators ----- +type PerfectionistSortDecorators = []|[{ partitionByComment?: (string[] | boolean | string) - partitionByNewLine?: boolean -}] -// ----- perfectionist/sort-exports ----- -type PerfectionistSortExports = []|[{ + sortOnParameters?: boolean - type?: ("alphabetical" | "natural" | "line-length") + sortOnProperties?: boolean - order?: ("asc" | "desc") + sortOnAccessors?: boolean - matcher?: ("minimatch" | "regex") + sortOnMethods?: boolean - ignoreCase?: boolean + sortOnClasses?: boolean specialCharacters?: ("remove" | "trim" | "keep") + customGroups?: { + [k: string]: (string | string[]) | undefined + } + + ignoreCase?: boolean + + locales?: (string | string[]) + + groups?: (string | string[])[] + + order?: ("asc" | "desc") + + type?: ("alphabetical" | "natural" | "line-length") +}] +// ----- perfectionist/sort-enums ----- +type PerfectionistSortEnums = []|[{ + partitionByComment?: (string[] | boolean | string) + forceNumericSort?: boolean + + sortByValue?: boolean + partitionByNewLine?: boolean - groupKind?: ("mixed" | "values-first" | "types-first") -}] -// ----- perfectionist/sort-imports ----- -type PerfectionistSortImports = []|[_PerfectionistSortImportsSortImports] -type _PerfectionistSortImportsSortImports = (_PerfectionistSortImportsMaxLineLengthRequiresLineLengthType & { + specialCharacters?: ("remove" | "trim" | "keep") - type?: ("alphabetical" | "natural" | "line-length") + ignoreCase?: boolean + + locales?: (string | string[]) order?: ("asc" | "desc") - matcher?: ("minimatch" | "regex") + type?: ("alphabetical" | "natural" | "line-length") +}] +// ----- perfectionist/sort-exports ----- +type PerfectionistSortExports = []|[{ - ignoreCase?: boolean + partitionByComment?: (string[] | boolean | string) + + groupKind?: ("mixed" | "values-first" | "types-first") + + partitionByNewLine?: boolean specialCharacters?: ("remove" | "trim" | "keep") - internalPattern?: string[] + ignoreCase?: boolean - sortSideEffects?: boolean + locales?: (string | string[]) - newlinesBetween?: ("ignore" | "always" | "never") + order?: ("asc" | "desc") - maxLineLength?: number + type?: ("alphabetical" | "natural" | "line-length") +}] +// ----- perfectionist/sort-heritage-clauses ----- +type PerfectionistSortHeritageClauses = []|[{ + + specialCharacters?: ("remove" | "trim" | "keep") + + customGroups?: { + [k: string]: (string | string[]) | undefined + } + + ignoreCase?: boolean + + locales?: (string | string[]) groups?: (string | string[])[] + order?: ("asc" | "desc") + + type?: ("alphabetical" | "natural" | "line-length") +}] +// ----- perfectionist/sort-imports ----- +type PerfectionistSortImports = []|[_PerfectionistSortImportsSortImports] +type _PerfectionistSortImportsSortImports = (_PerfectionistSortImportsMaxLineLengthRequiresLineLengthType & { + customGroups?: { - type?: { + + value?: { [k: string]: unknown | undefined } - value?: { + + type?: { [k: string]: unknown | undefined } } + partitionByComment?: (string[] | boolean | string) + + internalPattern?: string[] + + maxLineLength?: number + + sortSideEffects?: boolean + environment?: ("node" | "bun") + + tsconfigRootDir?: string + + partitionByNewLine?: boolean + + specialCharacters?: ("remove" | "trim" | "keep") + + newlinesBetween?: ("ignore" | "always" | "never") + + ignoreCase?: boolean + + locales?: (string | string[]) + + groups?: (string | string[])[] + + order?: ("asc" | "desc") + + type?: ("alphabetical" | "natural" | "line-length") }) type _PerfectionistSortImportsMaxLineLengthRequiresLineLengthType = ({ [k: string]: unknown | undefined @@ -6466,284 +6506,317 @@ interface _PerfectionistSortImports_IsLineLength { // ----- perfectionist/sort-interfaces ----- type PerfectionistSortInterfaces = []|[{ - type?: ("alphabetical" | "natural" | "line-length") + ignorePattern?: string[] - order?: ("asc" | "desc") + partitionByComment?: (string[] | boolean | string) - matcher?: ("minimatch" | "regex") + groupKind?: ("mixed" | "optional-first" | "required-first") - ignoreCase?: boolean + partitionByNewLine?: boolean specialCharacters?: ("remove" | "trim" | "keep") - ignorePattern?: string[] + newlinesBetween?: ("ignore" | "always" | "never") - partitionByComment?: (boolean | string | string[]) + customGroups?: { + [k: string]: (string | string[]) | undefined + } - partitionByNewLine?: boolean + ignoreCase?: boolean - groupKind?: ("mixed" | "optional-first" | "required-first") + locales?: (string | string[]) groups?: (string | string[])[] - customGroups?: { - [k: string]: (string | string[]) | undefined - } + order?: ("asc" | "desc") + + type?: ("alphabetical" | "natural" | "line-length") }] // ----- perfectionist/sort-intersection-types ----- type PerfectionistSortIntersectionTypes = []|[{ - type?: ("alphabetical" | "natural" | "line-length") + partitionByComment?: (string[] | boolean | string) - order?: ("asc" | "desc") + partitionByNewLine?: boolean + + specialCharacters?: ("remove" | "trim" | "keep") - matcher?: ("minimatch" | "regex") + newlinesBetween?: ("ignore" | "always" | "never") ignoreCase?: boolean - specialCharacters?: ("remove" | "trim" | "keep") + locales?: (string | string[]) groups?: (string | string[])[] - partitionByComment?: (string[] | boolean | string) + order?: ("asc" | "desc") - partitionByNewLine?: boolean + type?: ("alphabetical" | "natural" | "line-length") }] // ----- perfectionist/sort-jsx-props ----- type PerfectionistSortJsxProps = []|[{ - type?: ("alphabetical" | "natural" | "line-length") + ignorePattern?: string[] - order?: ("asc" | "desc") + specialCharacters?: ("remove" | "trim" | "keep") - matcher?: ("minimatch" | "regex") + customGroups?: { + [k: string]: (string | string[]) | undefined + } ignoreCase?: boolean - specialCharacters?: ("remove" | "trim" | "keep") - - ignorePattern?: string[] + locales?: (string | string[]) groups?: (string | string[])[] - customGroups?: { - [k: string]: (string | string[]) | undefined - } + order?: ("asc" | "desc") + + type?: ("alphabetical" | "natural" | "line-length") }] // ----- perfectionist/sort-maps ----- type PerfectionistSortMaps = []|[{ - type?: ("alphabetical" | "natural" | "line-length") + partitionByComment?: (string[] | boolean | string) - order?: ("asc" | "desc") + partitionByNewLine?: boolean - matcher?: ("minimatch" | "regex") + specialCharacters?: ("remove" | "trim" | "keep") ignoreCase?: boolean - specialCharacters?: ("remove" | "trim" | "keep") + locales?: (string | string[]) + + order?: ("asc" | "desc") + + type?: ("alphabetical" | "natural" | "line-length") +}] +// ----- perfectionist/sort-modules ----- +type PerfectionistSortModules = []|[{ + + customGroups?: ({ + + groupName?: string + + type?: ("alphabetical" | "line-length" | "natural" | "unsorted") + + order?: ("desc" | "asc") + anyOf?: { + + modifiers?: ("async" | "declare" | "decorated" | "default" | "export")[] + + elementValuePattern?: string + + decoratorNamePattern?: string + + selector?: ("enum" | "function" | "interface" | "type" | "class") + + elementNamePattern?: string + }[] + } | { + + groupName?: string + + type?: ("alphabetical" | "line-length" | "natural" | "unsorted") + + order?: ("desc" | "asc") + + modifiers?: ("async" | "declare" | "decorated" | "default" | "export")[] + + elementValuePattern?: string + + decoratorNamePattern?: string + + selector?: ("enum" | "function" | "interface" | "type" | "class") + + elementNamePattern?: string + })[] partitionByComment?: (string[] | boolean | string) partitionByNewLine?: boolean + + specialCharacters?: ("remove" | "trim" | "keep") + + newlinesBetween?: ("ignore" | "always" | "never") + + ignoreCase?: boolean + + locales?: (string | string[]) + + groups?: (string | string[])[] + + order?: ("asc" | "desc") + + type?: ("alphabetical" | "natural" | "line-length") }] // ----- perfectionist/sort-named-exports ----- type PerfectionistSortNamedExports = []|[{ - type?: ("alphabetical" | "natural" | "line-length") - - order?: ("asc" | "desc") + partitionByComment?: (string[] | boolean | string) - matcher?: ("minimatch" | "regex") + groupKind?: ("mixed" | "values-first" | "types-first") - ignoreCase?: boolean + partitionByNewLine?: boolean specialCharacters?: ("remove" | "trim" | "keep") - groupKind?: ("mixed" | "values-first" | "types-first") + ignoreCase?: boolean - partitionByComment?: (string[] | boolean | string) + locales?: (string | string[]) - partitionByNewLine?: boolean + order?: ("asc" | "desc") + + type?: ("alphabetical" | "natural" | "line-length") }] // ----- perfectionist/sort-named-imports ----- type PerfectionistSortNamedImports = []|[{ - type?: ("alphabetical" | "natural" | "line-length") + partitionByComment?: (string[] | boolean | string) - order?: ("asc" | "desc") + groupKind?: ("mixed" | "values-first" | "types-first") - matcher?: ("minimatch" | "regex") + ignoreAlias?: boolean - ignoreCase?: boolean + partitionByNewLine?: boolean specialCharacters?: ("remove" | "trim" | "keep") - ignoreAlias?: boolean + ignoreCase?: boolean - groupKind?: ("mixed" | "values-first" | "types-first") + locales?: (string | string[]) - partitionByComment?: (string[] | boolean | string) + order?: ("asc" | "desc") - partitionByNewLine?: boolean + type?: ("alphabetical" | "natural" | "line-length") }] // ----- perfectionist/sort-object-types ----- type PerfectionistSortObjectTypes = []|[{ - type?: ("alphabetical" | "natural" | "line-length") - - order?: ("asc" | "desc") - - matcher?: ("minimatch" | "regex") - - ignoreCase?: boolean - - specialCharacters?: ("remove" | "trim" | "keep") - partitionByComment?: (string[] | boolean | string) + groupKind?: ("mixed" | "required-first" | "optional-first") + partitionByNewLine?: boolean - groupKind?: ("mixed" | "required-first" | "optional-first") + specialCharacters?: ("remove" | "trim" | "keep") - groups?: (string | string[])[] + newlinesBetween?: ("ignore" | "always" | "never") customGroups?: { [k: string]: (string | string[]) | undefined } -}] -// ----- perfectionist/sort-objects ----- -type PerfectionistSortObjects = []|[{ - type?: ("alphabetical" | "natural" | "line-length") + ignoreCase?: boolean - order?: ("asc" | "desc") + locales?: (string | string[]) - matcher?: ("minimatch" | "regex") + groups?: (string | string[])[] - ignoreCase?: boolean + order?: ("asc" | "desc") - specialCharacters?: ("remove" | "trim" | "keep") + type?: ("alphabetical" | "natural" | "line-length") +}] +// ----- perfectionist/sort-objects ----- +type PerfectionistSortObjects = []|[{ + + ignorePattern?: string[] partitionByComment?: (string[] | boolean | string) - partitionByNewLine?: boolean + destructureOnly?: boolean styledComponents?: boolean - destructureOnly?: boolean + partitionByNewLine?: boolean - ignorePattern?: string[] + specialCharacters?: ("remove" | "trim" | "keep") - groups?: (string | string[])[] + newlinesBetween?: ("ignore" | "always" | "never") customGroups?: { [k: string]: (string | string[]) | undefined } -}] -// ----- perfectionist/sort-sets ----- -type PerfectionistSortSets = []|[{ - - type?: ("alphabetical" | "natural" | "line-length") - - order?: ("asc" | "desc") - - matcher?: ("minimatch" | "regex") ignoreCase?: boolean - specialCharacters?: ("remove" | "trim" | "keep") + locales?: (string | string[]) - groupKind?: ("mixed" | "literals-first" | "spreads-first") + groups?: (string | string[])[] - partitionByComment?: (string[] | boolean | string) + order?: ("asc" | "desc") - partitionByNewLine?: boolean + type?: ("alphabetical" | "natural" | "line-length") }] -// ----- perfectionist/sort-svelte-attributes ----- -type PerfectionistSortSvelteAttributes = []|[{ +// ----- perfectionist/sort-sets ----- +type PerfectionistSortSets = []|[{ - type?: ("alphabetical" | "natural" | "line-length") + partitionByComment?: (string[] | boolean | string) - order?: ("asc" | "desc") + groupKind?: ("mixed" | "literals-first" | "spreads-first") + + partitionByNewLine?: boolean - matcher?: ("minimatch" | "regex") + specialCharacters?: ("remove" | "trim" | "keep") ignoreCase?: boolean - specialCharacters?: ("remove" | "trim" | "keep") + locales?: (string | string[]) - groups?: (string | string[])[] + order?: ("asc" | "desc") - customGroups?: { - [k: string]: (string | string[]) | undefined - } + type?: ("alphabetical" | "natural" | "line-length") }] // ----- perfectionist/sort-switch-case ----- type PerfectionistSortSwitchCase = []|[{ - type?: ("alphabetical" | "natural" | "line-length") - - order?: ("asc" | "desc") + specialCharacters?: ("remove" | "trim" | "keep") ignoreCase?: boolean - specialCharacters?: ("remove" | "trim" | "keep") + locales?: (string | string[]) + + order?: ("asc" | "desc") + + type?: ("alphabetical" | "natural" | "line-length") }] // ----- perfectionist/sort-union-types ----- type PerfectionistSortUnionTypes = []|[{ - type?: ("alphabetical" | "natural" | "line-length") + partitionByComment?: (string[] | boolean | string) - order?: ("asc" | "desc") + partitionByNewLine?: boolean - matcher?: ("minimatch" | "regex") + specialCharacters?: ("remove" | "trim" | "keep") + + newlinesBetween?: ("ignore" | "always" | "never") ignoreCase?: boolean - specialCharacters?: ("remove" | "trim" | "keep") + locales?: (string | string[]) groups?: (string | string[])[] - partitionByComment?: (string[] | boolean | string) + order?: ("asc" | "desc") - partitionByNewLine?: boolean + type?: ("alphabetical" | "natural" | "line-length") }] // ----- perfectionist/sort-variable-declarations ----- type PerfectionistSortVariableDeclarations = []|[{ - type?: ("alphabetical" | "natural" | "line-length") - - order?: ("asc" | "desc") - - matcher?: ("minimatch" | "regex") - - ignoreCase?: boolean - - specialCharacters?: ("remove" | "trim" | "keep") - partitionByComment?: (string[] | boolean | string) partitionByNewLine?: boolean -}] -// ----- perfectionist/sort-vue-attributes ----- -type PerfectionistSortVueAttributes = []|[{ - - type?: ("alphabetical" | "natural" | "line-length") - order?: ("asc" | "desc") - - matcher?: ("minimatch" | "regex") + specialCharacters?: ("remove" | "trim" | "keep") ignoreCase?: boolean - specialCharacters?: ("remove" | "trim" | "keep") + locales?: (string | string[]) - groups?: (string | string[])[] + order?: ("asc" | "desc") - customGroups?: { - [k: string]: (string | string[]) | undefined - } + type?: ("alphabetical" | "natural" | "line-length") }] // ----- prefer-arrow-callback ----- type PreferArrowCallback = []|[{ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 67c6d237..7866f306 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -195,8 +195,8 @@ importers: specifier: 50.5.0 version: 50.5.0(eslint@9.15.0(jiti@2.4.0)) eslint-plugin-perfectionist: - specifier: 3.9.1 - version: 3.9.1(eslint@9.15.0(jiti@2.4.0))(typescript@5.6.3) + specifier: 4.0.3 + version: 4.0.3(eslint@9.15.0(jiti@2.4.0))(typescript@5.6.3) eslint-plugin-unused-imports: specifier: 4.1.4 version: 4.1.4(@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.15.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.15.0(jiti@2.4.0)) @@ -2145,24 +2145,11 @@ packages: resolution: {integrity: sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==} engines: {node: '>=5.0.0'} - eslint-plugin-perfectionist@3.9.1: - resolution: {integrity: sha512-9WRzf6XaAxF4Oi5t/3TqKP5zUjERhasHmLFHin2Yw6ZAp/EP/EVA2dr3BhQrrHWCm5SzTMZf0FcjDnBkO2xFkA==} + eslint-plugin-perfectionist@4.0.3: + resolution: {integrity: sha512-CyafnreF6boy4lf1XaF72U8NbkwrfjU/mOf1y6doaDMS9zGXhUU1DSk+ZPf/rVwCf1PL1m+rhHqFs+IcB8kDmA==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: - astro-eslint-parser: ^1.0.2 eslint: '>=8.0.0' - svelte: '>=3.0.0' - svelte-eslint-parser: ^0.41.1 - vue-eslint-parser: '>=9.0.0' - peerDependenciesMeta: - astro-eslint-parser: - optional: true - svelte: - optional: true - svelte-eslint-parser: - optional: true - vue-eslint-parser: - optional: true eslint-plugin-unused-imports@4.1.4: resolution: {integrity: sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==} @@ -3034,12 +3021,13 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - natural-compare-lite@1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} - natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + natural-orderby@5.0.0: + resolution: {integrity: sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==} + engines: {node: '>=18'} + neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} @@ -6040,13 +6028,12 @@ snapshots: eslint-plugin-no-only-tests@3.3.0: {} - eslint-plugin-perfectionist@3.9.1(eslint@9.15.0(jiti@2.4.0))(typescript@5.6.3): + eslint-plugin-perfectionist@4.0.3(eslint@9.15.0(jiti@2.4.0))(typescript@5.6.3): dependencies: '@typescript-eslint/types': 8.15.0 '@typescript-eslint/utils': 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.6.3) eslint: 9.15.0(jiti@2.4.0) - minimatch: 9.0.5 - natural-compare-lite: 1.4.0 + natural-orderby: 5.0.0 transitivePeerDependencies: - supports-color - typescript @@ -6924,10 +6911,10 @@ snapshots: nanoid@3.3.7: {} - natural-compare-lite@1.4.0: {} - natural-compare@1.4.0: {} + natural-orderby@5.0.0: {} + neo-async@2.6.2: {} nerf-dart@1.0.0: {}