-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
Rule proposal: Forbid !foo === bar
#1421
Comments
|
This looks similar to https://eslint.org/docs/rules/no-unsafe-negation Maybe that rule could support this too? |
That rule not checking this case, but I can make a proposal there. |
Forgot to mention here, issue on ESLint codebase eslint/eslint#14802, and seems they are going accept. |
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as duplicate.
This comment was marked as duplicate.
Accepted as |
I'm not sure what name it should be, this is a common mistake, espeically when doing quick debugging. Personally I've done this several times.
We have this syntax forbidden in Prettier codebase, with
no-restricted-syntax
rule, because I made a mistake once there.Fail
Pass
The text was updated successfully, but these errors were encountered: