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
New option in no-unsafe-negation to report ! a < b #12163
Closed
mdjermanovic opened this issue
Aug 25, 2019
· 4 comments
· Fixed by WealthWizardsEngineering/service-registry#12, basics/vector#111, thinkwee/thinkwee.github.io#39, alxtford/numconv#46 or WoTTsecurity/api#773
Closed
New option in no-unsafe-negation to report ! a < b #12163
mdjermanovic opened this issue
Aug 25, 2019
· 4 comments
· Fixed by WealthWizardsEngineering/service-registry#12, basics/vector#111, thinkwee/thinkwee.github.io#39, alxtford/numconv#46 or WoTTsecurity/api#773
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
enhancement
This change enhances an existing feature of ESLint
Hacktoberfest
Recommended issue for those participating in Hacktoberfest https://hacktoberfest.digitalocean.com/
help wanted
The team would welcome a contribution from the community for this issue
rule
Relates to ESLint's core rules
Comments
This has now been accepted. |
@mdjermanovic do you still want to do the PR for this? If not I could take it on |
@samrae7 feel free to claim this. PR is welcome, thanks! |
@mdjermanovic thank you. I will work on it over the weekend |
samrae7
added a commit
to samrae7/eslint
that referenced
this issue
Oct 13, 2019
samrae7
added a commit
to samrae7/eslint
that referenced
this issue
Oct 13, 2019
samrae7
added a commit
to samrae7/eslint
that referenced
this issue
Oct 13, 2019
samrae7
added a commit
to samrae7/eslint
that referenced
this issue
Oct 13, 2019
This was referenced Nov 9, 2019
This was referenced Mar 26, 2020
This was referenced Apr 3, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
enhancement
This change enhances an existing feature of ESLint
Hacktoberfest
Recommended issue for those participating in Hacktoberfest https://hacktoberfest.digitalocean.com/
help wanted
The team would welcome a contribution from the community for this issue
rule
Relates to ESLint's core rules
What rule do you want to change?
no-unsafe-negation
The rule currently targets only
in
andinstanceof
.<
,>
,<=
,>=
are also relational operators.! a < b
is equivalent to(a ? 0 : 1) < b
(I think), which is rarely the intended meaning:Does this change cause the rule to produce more or fewer warnings?
More if the option is set to
true
. Default isfalse
.How will the change be implemented? (New option, new default behavior, etc.)?
New option.
Please provide some example code that this change will affect:
What does the rule currently do for this code?
Nothing.
What will the rule do after it's changed?
4 errors
Are you willing to submit a pull request to implement this change?
Yes.
The text was updated successfully, but these errors were encountered: