eslint-plugin-perfectionist icon indicating copy to clipboard operation
eslint-plugin-perfectionist copied to clipboard

Feature: Add `groupKind` option to `perfectionist/sort-classes`

Open OlivierZal opened this issue 6 months ago • 7 comments

What rule do you want to change?

perfectionist/sort-classes

Describe the problem

Like for perfectionist/sort-interfaces, a groupKind: 'optional-first' | 'required-first' | 'mixed' = 'mixed' option would be useful and allow what the optionalityOrder?: 'optional-first' | 'required-first' option does for the frozen member-ordering rule.

Code example

The proposed option exists here for another rule (perfectionist/sort-interfaces).

Additional comments

No response

Validations

  • [X] Read the docs.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

OlivierZal avatar Aug 07 '24 08:08 OlivierZal