-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Bug]: boolean-prop-naming
rule throws error
#3717
Comments
Thanks for the report! unfortunately the tests pass for me. I see an easy fix but I can't land it without a failing test case :-/ |
what version of the TS eslint parser do you have installed? |
@ljharb I’m using Not sure why it’s passing, but the only difference in my project is updating |
oh it’s definitely a change in the react plugin :-) but we don’t even test on v6 of that parser, let alone v7 (which i didn’t know exists yet) which is why we didn’t catch it. |
There may be an impact due to the fact that typescript version 7 has not been tested, but it is assumed that the case below causes the above error. type Props = {
enabled: boolean
}
const Hello = (props: Props & {
semi: boolean
}) => <div />; So first, i modify the code so that the test case succeeds. |
@developer-bandi just make sure the test fails before the fix is applied :-) we may need to add testing in v6 and v7 to reproduce it in CI. |
@ljharb would you re-open this issue? I am still getting the error in
|
@jlarmstrongiv that's because the fix isn't released yet. Issues on github are closed when fixes are landed, not when they're released. |
Is there an existing issue for this?
Description Overview
eslint-plugin-react
breaks in a patch update.I wasn’t able to narrow it down, but @developer-bandi and @ljharb made changes to the
boolean-prop-naming
in the current release. While the fixes are fantastic, it seems like something also broke in the process.From https://kitchen-sink.trpc.io/react-hook-form
npx eslint . --ext .ts,.tsx,.js,.jsx --ignore-path=".gitignore"
Expected Behavior
eslint telling me a rule was broken, not crashing unexpectedly
eslint-plugin-react version
7.34.1
eslint version
8.57.0
node version
20.11.1
The text was updated successfully, but these errors were encountered: