Skip to content

Commit

Permalink
fix(react): [sort-jsx-props] use regex pattern for custom groups
Browse files Browse the repository at this point in the history
- with eslint-plugin-perfectionist@4 the support of glob pattern was removed in favor of regex which leads to unintended sorting of the props, see: https://github.com/azat-io/eslint-plugin-perfectionist/releases/tag/v4.0.0
  • Loading branch information
SimonGolms committed Jan 15, 2025
1 parent 8f80734 commit 8625bbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ module.exports = {
'error',
{
customGroups: {
callback: 'on*',
reservedProps: ['children', 'dangerouslySetInnerHTML', 'key', 'ref'], // Reserved props from: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/jsx-sort-props.js#L40C12-L40C12
callback: '^on.+',
reservedProps: ['children', 'dangerouslySetInnerHTML', 'key', 'ref'], // Reserved props from: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/lib/rules/jsx-sort-props.js#L41-L46
},
groups: ['reservedProps', 'unknown', 'callback'],
ignoreCase: true,
Expand Down

0 comments on commit 8625bbd

Please sign in to comment.