diff --git a/.changeset/renovate-b717de3.md b/.changeset/renovate-b717de3.md new file mode 100644 index 00000000..b2abfad0 --- /dev/null +++ b/.changeset/renovate-b717de3.md @@ -0,0 +1,5 @@ +--- +'@bfra.me/eslint-config': patch +--- + +Updated dependency `eslint-plugin-perfectionist` to `4.2.0`. diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 109bba54..ad8f25f4 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.5.0", "eslint-plugin-jsdoc": "50.6.0", - "eslint-plugin-perfectionist": "4.1.2", + "eslint-plugin-perfectionist": "4.2.0", "eslint-plugin-unused-imports": "4.1.4", "globals": "15.13.0", "is-in-ci": "1.0.0", diff --git a/packages/eslint-config/src/rules.d.ts b/packages/eslint-config/src/rules.d.ts index e89fe5cf..30db10e2 100644 --- a/packages/eslint-config/src/rules.d.ts +++ b/packages/eslint-config/src/rules.d.ts @@ -6314,6 +6314,10 @@ type PerfectionistSortArrayIncludes = []|[{ // ----- perfectionist/sort-classes ----- type PerfectionistSortClasses = []|[{ + ignoreCallbackDependenciesPatterns?: string[] + + partitionByComment?: (string[] | boolean | string) + customGroups?: ({ groupName?: string @@ -6323,12 +6327,12 @@ type PerfectionistSortClasses = []|[{ order?: ("desc" | "asc") anyOf?: { - modifiers?: ("async" | "protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[] - elementValuePattern?: string decoratorNamePattern?: string + modifiers?: ("async" | "protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[] + selector?: ("accessor-property" | "index-signature" | "constructor" | "static-block" | "get-method" | "set-method" | "function-property" | "property" | "method") elementNamePattern?: string @@ -6341,21 +6345,17 @@ type PerfectionistSortClasses = []|[{ order?: ("desc" | "asc") - modifiers?: ("async" | "protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[] - elementValuePattern?: string decoratorNamePattern?: string + modifiers?: ("async" | "protected" | "private" | "public" | "static" | "abstract" | "override" | "readonly" | "decorated" | "declare" | "optional")[] + selector?: ("accessor-property" | "index-signature" | "constructor" | "static-block" | "get-method" | "set-method" | "function-property" | "property" | "method") elementNamePattern?: string })[] - ignoreCallbackDependenciesPatterns?: string[] - - partitionByComment?: (string[] | boolean | string) - partitionByNewLine?: boolean specialCharacters?: ("remove" | "trim" | "keep") @@ -6518,8 +6518,39 @@ type PerfectionistSortInterfaces = []|[{ ignorePattern?: string[] partitionByComment?: (string[] | boolean | string) + customGroups?: ({ + [k: string]: (string | string[]) | undefined + } | ({ + + groupName?: string + + type?: ("alphabetical" | "line-length" | "natural" | "unsorted") + + order?: ("desc" | "asc") + anyOf?: { + + modifiers?: ("optional" | "required" | "multiline")[] + + selector?: ("index-signature" | "member" | "method" | "multiline" | "property") + + elementNamePattern?: string + }[] + } | { + + groupName?: string + + type?: ("alphabetical" | "line-length" | "natural" | "unsorted") + + order?: ("desc" | "asc") + + modifiers?: ("optional" | "required" | "multiline")[] + + selector?: ("index-signature" | "member" | "method" | "multiline" | "property") + + elementNamePattern?: string + })[]) - groupKind?: ("mixed" | "optional-first" | "required-first") + groupKind?: ("mixed" | "required-first" | "optional-first") partitionByNewLine?: boolean @@ -6527,10 +6558,6 @@ type PerfectionistSortInterfaces = []|[{ newlinesBetween?: ("ignore" | "always" | "never") - customGroups?: { - [k: string]: (string | string[]) | undefined - } - ignoreCase?: boolean locales?: (string | string[]) @@ -6603,6 +6630,8 @@ type PerfectionistSortMaps = []|[{ // ----- perfectionist/sort-modules ----- type PerfectionistSortModules = []|[{ + partitionByComment?: (string[] | boolean | string) + customGroups?: ({ groupName?: string @@ -6612,12 +6641,10 @@ type PerfectionistSortModules = []|[{ order?: ("desc" | "asc") anyOf?: { - modifiers?: ("async" | "declare" | "decorated" | "default" | "export")[] - - elementValuePattern?: string - decoratorNamePattern?: string + modifiers?: ("async" | "declare" | "decorated" | "default" | "export")[] + selector?: ("enum" | "function" | "interface" | "type" | "class") elementNamePattern?: string @@ -6630,19 +6657,15 @@ type PerfectionistSortModules = []|[{ order?: ("desc" | "asc") - modifiers?: ("async" | "declare" | "decorated" | "default" | "export")[] - - elementValuePattern?: string - decoratorNamePattern?: string + modifiers?: ("async" | "declare" | "decorated" | "default" | "export")[] + selector?: ("enum" | "function" | "interface" | "type" | "class") elementNamePattern?: string })[] - partitionByComment?: (string[] | boolean | string) - partitionByNewLine?: boolean specialCharacters?: ("remove" | "trim" | "keep") @@ -6702,7 +6725,40 @@ type PerfectionistSortNamedImports = []|[{ // ----- perfectionist/sort-object-types ----- type PerfectionistSortObjectTypes = []|[{ + ignorePattern?: string[] + partitionByComment?: (string[] | boolean | string) + customGroups?: ({ + [k: string]: (string | string[]) | undefined + } | ({ + + groupName?: string + + type?: ("alphabetical" | "line-length" | "natural" | "unsorted") + + order?: ("desc" | "asc") + anyOf?: { + + modifiers?: ("optional" | "required" | "multiline")[] + + selector?: ("index-signature" | "member" | "method" | "multiline" | "property") + + elementNamePattern?: string + }[] + } | { + + groupName?: string + + type?: ("alphabetical" | "line-length" | "natural" | "unsorted") + + order?: ("desc" | "asc") + + modifiers?: ("optional" | "required" | "multiline")[] + + selector?: ("index-signature" | "member" | "method" | "multiline" | "property") + + elementNamePattern?: string + })[]) groupKind?: ("mixed" | "required-first" | "optional-first") @@ -6712,10 +6768,6 @@ type PerfectionistSortObjectTypes = []|[{ newlinesBetween?: ("ignore" | "always" | "never") - customGroups?: { - [k: string]: (string | string[]) | undefined - } - ignoreCase?: boolean locales?: (string | string[]) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f3e139d9..8a06b46a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -201,8 +201,8 @@ importers: specifier: 50.6.0 version: 50.6.0(eslint@9.16.0(jiti@2.4.1)) eslint-plugin-perfectionist: - specifier: 4.1.2 - version: 4.1.2(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) + specifier: 4.2.0 + version: 4.2.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) eslint-plugin-unused-imports: specifier: 4.1.4 version: 4.1.4(@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.16.0(jiti@2.4.1)) @@ -2189,8 +2189,8 @@ packages: resolution: {integrity: sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==} engines: {node: '>=5.0.0'} - eslint-plugin-perfectionist@4.1.2: - resolution: {integrity: sha512-YjXPWB/rKe/gPUsyuxw75wTUrzN5MuJnRV0PH9NoonFvgcdVIXk551mkBKPr59nRZCbu7S3dFHwfo4gA42DB2w==} + eslint-plugin-perfectionist@4.2.0: + resolution: {integrity: sha512-hEMFx5xfSc/0OLZXJhSaLUKkFxATuRf4yL2iVfxEcxkkb17DfoLZY9eH960dPSw5uB7o+4avqP3rtkNp1Vwo7w==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: eslint: '>=8.0.0' @@ -6197,7 +6197,7 @@ snapshots: eslint-plugin-no-only-tests@3.3.0: {} - eslint-plugin-perfectionist@4.1.2(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2): + eslint-plugin-perfectionist@4.2.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2): dependencies: '@typescript-eslint/types': 8.17.0 '@typescript-eslint/utils': 8.17.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2)