Closed k-teplyakov closed 1 year ago
sort-union-types considers an inline comment as part of a union type and breaks it by sorting it
This case is ok
- accountTypeIds?: (1 | 2 | 3 | 4 | 5 | 100)[]; // Specific Account type Ids to filter accounts. Example: 2 + accountTypeIds?: (100 | 5 | 4 | 3 | 2 | 1)[]; // Specific Account type Ids to filter accounts. Example: 2
And here is the problem
- accountTypeId: 1 | 2 | 3 | 4 | 5 | 100; // Account type ID. Example: 3 + accountTypeId: 100 | // Account type ID. Example: 3 5 | 4 | 3 | 2 | 1;
8.21.0
1.5.0
No response
Thank you for issue. I think I can look into this more on Friday.
Fixed in 95560abdad35184a3d88598fccc7e45956804a4b.
Release is coming soon.
Released in v2.0.0
Describe the bug
sort-union-types considers an inline comment as part of a union type and breaks it by sorting it
Code example
This case is ok
And here is the problem
ESLint version
8.21.0
ESLint Plugin Perfectionist version
1.5.0
Additional comments
No response
Validations