diff --git a/package.json b/package.json index 7acf110..06c04f1 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "eslint-plugin-jest-dom": "^5.5.0", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-n": "^17.14.0", - "eslint-plugin-perfectionist": "^4.1.2", + "eslint-plugin-perfectionist": "^4.2.0", "eslint-plugin-playwright": "^2.1.0", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-compiler": "19.0.0-beta-df7b47d-20241124", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e5925e..7b18722 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,8 +57,8 @@ importers: specifier: ^17.14.0 version: 17.14.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-playwright: specifier: ^2.1.0 version: 2.1.0(eslint@9.16.0(jiti@2.4.1)) @@ -1708,10 +1708,6 @@ packages: resolution: {integrity: sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.16.0': - resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.17.0': resolution: {integrity: sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2631,8 +2627,8 @@ packages: peerDependencies: eslint: '>=8.23.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' @@ -6843,8 +6839,6 @@ snapshots: '@typescript-eslint/types@8.15.0': {} - '@typescript-eslint/types@8.16.0': {} - '@typescript-eslint/types@8.17.0': {} '@typescript-eslint/typescript-estree@8.13.0(typescript@5.7.2)': @@ -8015,9 +8009,9 @@ snapshots: minimatch: 9.0.5 semver: 7.6.3 - 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.16.0 + '@typescript-eslint/types': 8.17.0 '@typescript-eslint/utils': 8.17.0(eslint@9.16.0(jiti@2.4.1))(typescript@5.7.2) eslint: 9.16.0(jiti@2.4.1) natural-orderby: 5.0.0 diff --git a/src/rules.gen.d.ts b/src/rules.gen.d.ts index bcf2b05..fe52c2a 100644 --- a/src/rules.gen.d.ts +++ b/src/rules.gen.d.ts @@ -9252,6 +9252,10 @@ type PerfectionistSortArrayIncludes = []|[{ // ----- perfectionist/sort-classes ----- type PerfectionistSortClasses = []|[{ + ignoreCallbackDependenciesPatterns?: string[] + + partitionByComment?: (string[] | boolean | string) + customGroups?: ({ groupName?: string @@ -9261,12 +9265,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 @@ -9279,21 +9283,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") @@ -9456,8 +9456,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 @@ -9465,10 +9496,6 @@ type PerfectionistSortInterfaces = []|[{ newlinesBetween?: ("ignore" | "always" | "never") - customGroups?: { - [k: string]: (string | string[]) | undefined - } - ignoreCase?: boolean locales?: (string | string[]) @@ -9541,6 +9568,8 @@ type PerfectionistSortMaps = []|[{ // ----- perfectionist/sort-modules ----- type PerfectionistSortModules = []|[{ + partitionByComment?: (string[] | boolean | string) + customGroups?: ({ groupName?: string @@ -9550,12 +9579,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 @@ -9568,19 +9595,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") @@ -9640,7 +9663,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") @@ -9650,10 +9706,6 @@ type PerfectionistSortObjectTypes = []|[{ newlinesBetween?: ("ignore" | "always" | "never") - customGroups?: { - [k: string]: (string | string[]) | undefined - } - ignoreCase?: boolean locales?: (string | string[])