npm / eslint-plugin-perfectionist
eslint-plugin-perfectionist
What changed in eslint-plugin-perfectionist 3 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
33 breaking61 new APIs and options4 performance16 behavior and defaults3 tooling56 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initeslint-plugin-perfectionist 5118 changes
Breaking changes 18
Rejects newline options combined with partitioning by newlines.
Multiline trailing block comments are no longer treated as leading comments.
The sort-arrays rule requires options to be provided.
Deprecated selector support for multiple rules was removed.
The plugin is ESM-only.
The fallback sort schema now requires a sorting type.
Support for group kinds was removed.
The deprecated setting for newlines between always and never was removed.
Node.js 18 is no longer supported.
Deprecated object-based custom groups are no longer supported.
The force numeric sort behavior was replaced, and the default for sorting by value was updated.
Deprecated TypeScript config root directory support was removed.
Deprecated selectors are no longer supported.
The deprecated ignore pattern option was removed.
The deprecated destructure-only option was removed.
The deprecated ignore pattern option was removed.
Object type options now use a conditional configuration pattern.
The deprecated ignore pattern was removed.
New APIs and options 38
Adds the sort-constructor-parameters rule.
Supports custom module block nodes.
Adds an option to ignore callable types when sorting intersection types.
Class option types are now exported for use by plugin consumers.
Spacing between overload signatures can now be configured.
Adds the sort-array rule.
Supports conditional configuration by AST selector.
Supports conditional configuration by AST selector and name pattern.
Supports conditional configuration by AST selector.
Supports conditional configuration by AST selector and name pattern.
Supports conditional configuration by AST selector and name pattern.
Supports conditional configuration by AST selector.
Supports conditional configuration by AST selector.
Supports conditional configuration by AST selector.
Supports conditional configuration by AST selector and name pattern.
Supports conditional configuration by AST selector.
Supports conditional configuration by AST selector.
Adds support for computed-key partitioning.
Supports conditional configuration by AST selector and name pattern.
Supports conditional configuration by AST selector and name pattern.
The rule now allows sorting by name and value.
Fallback sort subgroup order is supported, affecting how items are ordered when they fall back to a subgroup.
Fallback sort can now be overridden in groups with overrides.
The rule can now sort imports by specifiers.
The rule can now sort modules by order of use.
Configuration can now be supplied using annotations.
Groups can now override types.
Groups can now override order.
New lines can now be configured inside group overrides.
The rule now supports array-based custom groups.
A rule for sorting export attributes was added.
The rule adds wildcard, named, and line-related modifiers.
The rule now supports array-based custom groups.
A rule for sorting import attributes was added.
The rule adds multiline and singleline modifiers.
A numeric keys detection option was added.
Pattern matching now has a scope option.
A numeric keys detection option was added.
Performance 4
Narrows dependency scope walks.
Caches disabled lines.
Skips elements whose options cannot report errors.
Skips work for objects that cannot be reported.
Behavior and default changes 11
The rule can sort arrow functions.
eslint is now an optional peer dependency, so it is no longer required as a peer dependency when installing the plugin.
Improves dependency detection for the sort-classes rule.
The dependency detection algorithm is improved, which may change how dependencies are detected.
Adds new lines between settings.
Adds new lines inside at-rule options and at the settings level.
Type-import-first fallback sorting is now supported.
Declaration patterns can now be matched within a scope.
Declaration comments can now be matched within a scope.
Declaration patterns can now be matched within a scope.
Pattern matching is now available for variable declarations.
Tooling 2
Supports using the plugin with oxlint without installing eslint.
Adds support for ESLint 10.
Fixes and other changes 45
The rule detects dependencies in decorators.
Restores the alphabet reverse method.
Natural sorting supports lists of locales.
Allows partitioning imports by newlines.
Registers the exported plugin object in configs.
Validates setting values.
Treats prefix-only modules without a prefix as external.
Stops the tsconfig search at the drive root on Windows.
Honors eslint-disable directives that include a description.
Adds a safety semicolon when the next element continues an expression.
Detects decorator metadata dependencies without tsconfig.
Detects decorator metadata dependencies.
Fixes cases where complex comments are not auto-fixed correctly.
Takes extended tsconfigs into account.
Respects ignored callback dependencies in nested calls.
Fixes a crash when used with TypeScript 7.
Dependency detection now handles IIFEs, auto-accessors, and computed enum access.
The rule skips condition-shaped switch statements.
Prevents the usage-sort autofix loop when sort-modules is configured with descending order.
Submodule imports are now treated as internal patterns by sort-imports.
Uncased character positions are now preserved.
Fixes an issue in sort-classes.
Adds missing partition cases to sort-modules.
Applies the first matching configuration in option order.
Makes selector match priority deterministic when options overlap.
Fixes invalid arrays being sorted.
Normalizes parenthesized union and intersection member names.
Avoids crashes on unknown class elements.
Finds declaration comments before exported variables.
Prevents the rule from reordering spread operators.
Fallback sorting is enabled for usage mode.
The rule supports overload signatures and no longer loops on overload signatures with sort-usages.
Plugin config typings are aligned with ESLint.
Uses runtime-safe node type checks.
The rule can sort decorated exported classes.
Plugin configs now have an explicit type annotation.
Improves plugin type compatibility.
Allows settings to be overridden with default values.
Handles a missing export kind when sorting exports.
Declaration comments are now honored for nested types.
Plugin usage with legacy configurations was fixed.
Settings priority is preserved when meta default options are provided.
Detection of complex object type declarations was improved.
Declaration names are matched from variable declarations.
Destructured dependencies are now handled.
eslint-plugin-perfectionist 429 changes
Breaking changes 6
The sort-astro-attributes rule was removed.
The rule's default grouping was updated.
Support for the old custom groups API was removed.
The sort-svelte-attributes rule was removed.
Breaks in case statements are no longer ignored.
The sort-vue-attributes rule was removed.
New APIs and options 14
Arbitrary module identifiers are now supported.
Handling for ESLint disable directives was added.
A locales option was added for all rules.
A newlines-between option was added.
An async modifier was added.
An option for ignoring callback dependency patterns was added.
A newlines-between option was added.
A partition-by-new-line option was added.
The sort-decorators rule was added.
The sort-heritage-clauses rule was added.
A partition-by-comment option was added.
A partition-by-new-line option was added.
The sort-modules rule was added.
Multiline and method groups were added.
Behavior and default changes 2
Aliased imports are now resolved through tsconfig.json.
Sorting nodes with comments was improved.
Fixes and other changes 7
An inline issue involving declare class was fixed.
Ending-comma and semicolon behavior was improved.
Types were made compatible with ESLint types.
Optional chaining imports are now supported.
Comment boundaries are now respected when partitioning by comments.
Properties prefixed with # are now detected as dependencies.
Key-name retrieval was fixed.
eslint-plugin-perfectionist 326 changes
Breaking changes 9
Case ignoring is enabled by default.
The configuration export changes; update code that imports or uses the plugin's config export.
Node.js 16 is no longer supported.
The nullable last option is removed from sort-union-types.
Options are renamed from kebab case to camel case, so existing configuration using kebab-case option names must be updated.
Recommended options become the default.
The spread last option is replaced with a group kind option.
The optionality order option is renamed to group kind.
The project moves to typescript-eslint v7.
New APIs and options 9
Environment selection and separation of bun modules are added.
A new ability to ignore JSX elements is added.
A partition by comment option is added to sort-classes.
A groups option is added to the sort-intersection-types rule.
A group kind option is added to sort-object-types.
A custom ignore option is added to make sort-objects ignore behavior customizable.
A new rule is available to sort switch cases.
A groups option is added to the sort-union-types rule.
A new rule is available to sort variable declarations.
Behavior and default changes 3
Natural sorting now respects numeric separators.
sort-imports now supports require.
Sorting objects for call expressions now uses the ignore pattern.
Tooling 1
TypeScript types are added for the plugin.
Fixes and other changes 4
The default value for export and import kind is fixed.
Support for the old getting context ESLint API is restored.
Class members are no longer sorted when the right value depends on the left.
Disabling styled components is fixed when using the css function.