-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
jsx-sort-props reservedFirst conflicts with callbacksLast #1632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Offender appears to be the second conditional check at line 249. |
jakezatecky
added a commit
to jakezatecky/react-dual-listbox
that referenced
this issue
Jan 7, 2018
…llbacksLast bug is fixed jsx-eslint/eslint-plugin-react#1632
@jakezatecky if you could provide a PR with a failing test case (or better, a fix!) that would be very appreciated. |
kolpax
pushed a commit
to kolpax/eslint-plugin-react
that referenced
this issue
Feb 12, 2018
ljharb
pushed a commit
to kolpax/eslint-plugin-react
that referenced
this issue
Aug 11, 2021
…icts with callbacksLast See jsx-eslint#1632.
ljharb
pushed a commit
to kolpax/eslint-plugin-react
that referenced
this issue
Feb 4, 2022
…icts with callbacksLast See jsx-eslint#1632.
Closed by #1632. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It appears that PR #1340 introduced a change when
reservedFirst
is enabled such that it conflicts with the optioncallbacksLast
. When this option is enabled, ESLint wants callbacks to be sorted alphabetically with respect to the rest of the properties. The following will incorrectly generate an error:eslintrc
:Notice that
onClick
occurs aftertype
, which should be the case given the rule configuration. However, the change in this PR made it to where the React plugin wantsonClick
to appear beforetype
, effectively disabling the entirecallbacksLast
rule.I have confirmed that reverting
jsx-sort-props.js
fixes this bug, but obviously that is not ideal because the alphabetic sorting fix in that PR is also desirable.The text was updated successfully, but these errors were encountered: