Closed
Description
Rule configuration:
'react/jsx-sort-props': [
'error',
{
noSortAlphabetically: false,
ignoreCase: true,
callbacksLast: false,
shorthandLast: true,
reservedFirst: true,
},
],
As a result callbacksLast
, shorthandLast
options are overridden by noSortAlphabetically
, so props are sorting only by alphabet ignoring shorthands at the end. Also, how can I reach this sort order:
- object spread props
- reserved props
- common props (html attributes, etc.)
- callback props
- shorthand/boolean props
Example:
<button
{...rest}
key={1}
type="button"
onClick={() => {}}
disabled
/>
Metadata
Metadata
Assignees
Labels
No labels