Open datismoa opened 5 months ago
This would also be helpful for keeping eslint-disable-next-line
comments associated with the thing they are trying to disable:
class C {
z = new Date();
// eslint-disable-next-line perfectionist/sort-classes
a = this.z;
}
(Context: https://github.com/azat-io/eslint-plugin-perfectionist/issues/102)
What rule do you want to change?
sort-object-types, sort-objects, sort-classes, ...?
Describe the problem
When some entity is being sorted, move along with it not only the first comment, but all of them before a blank line or a non-comment entity is found
Code example
(natural sorting is used)
Example 1:
to
Example 2:
to
Example 3:
to
Example 4
to
Additional comments
Really needed this functionality, so I have hastily created a workaround. Repository: https://github.com/datismoa/eslint-plugin-perfectionist. Does not break any of tests, tho
Would be great if we had an option that regulates such behaviour & the ability to choose in what entities and how (for example, count a multiline comment as an inhibitor) it works
Validations