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 ddece22 commit 720df19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configs/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ module.exports = tseslint.config(
'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 720df19

Please sign in to comment.