Post

Released ESLint Plugin Perfectionist v5.0.0. 🎉 It’s a plugin for sorting imports, TS types, JSX props, classes, objects, variables, and more. In this release: move to ESM-only, dropped Node.js v18 support, two new rules. github.com/azat-io/esli... More in the thread below ⬇️

github.comGitHub - azat-io/eslint-plugin-perfectionist: ☂️ ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.☂️ ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc. - azat-io/eslint-plugin-perfectionist

Two new rules for sorting import/export attributes, a new JS feature: - sort-import-attributes - sort-export-attributes import { foo } from 'foo' with { type: 'json', unknown: 'unknown' }

Expanded useConfigurationIf. You can now apply different settings depending on: - declaration name (declarationMatchesPattern) - comment above the declaration (declarationCommentMatchesPattern) - having only numeric keys (hasNumericKeysOnly)

In groups you can now override type, order, and newlinesBetween directly within the group. This gives more flexibility for complex configurations without duplicating settings. Also added modifiers multiline/singleline for sort-imports and wildcard/named for sort-exports.

In addition, we added more pattern‑matching options in sort-objects and sort-object-types, improved numeric key sorting, and fixed many small bugs, especially around comment handling. Removed deprecated API. The plugin is smarter and more stable.

No replies yet.