eslint-plugin-perfectionist
eslint-plugin-perfectionist copied to clipboard
Bug: `sort-object-types` Optionality ignores the notion of group
Describe the bug
Optionality seems to be ignoring the notion of group:
Code example
Configuration:
"perfectionist/sort-object-types": ["error", {
"groupKind": "optional-first",
"groups": [
"callback",
"unknown"
],
"customGroups": {
"callback": "on*"
}
}],
The following code below is invalid (onClick
belongs to a group before a
):
type A = {
a
onClick
}
while this one is valid
type A = {
a?
onClick
}
Is optionality supposed to be ignoring groups?
ESLint version
8.57.0
ESLint Plugin Perfectionist version
3.2.0
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.