-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
What rule do you want to change?
eqeqeq
What change do you want to make?
Implement suggestions
How do you think the change should be implemented?
A new default behavior
Example code
if (x == 42) { }
if ("" == text) { }
if (obj.getStuff() != undefined) { }
a == b
foo == true
bananas != 1
value == undefined
foo == null
What does the rule currently do for this code?
Reporting an error.
What will the rule do after it's changed?
Suggests changing to strict comparison.
Participation
- I am willing to submit a pull request to implement this change.
Additional comments
There was an earlier discussion at #4578, and at that time you decided to disable auto-fix for eqeqeq
altogether.
Then, for some cases, you did bring it back; for those cases in the documentation, the auto-fix works:
typeof foo == 'undefined'
'hello' != 'world'
0 == 0
true == true
The last time there was a discussion about this, I understand there were no suggestions back then, but it seems that for the other cases, the suggestions would have worked fine.
rakleed and lishaducklishaduck
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
Type
Projects
Status
Complete