Skip to content

Conversation

not-an-aardvark
Copy link
Member

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[x] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

This adds a fixer for certain specific cases of eqeqeq.

/* eslint eqeqeq: 2 */

typeof foo == 'bar'
1 == 1

// gets fixed to:

typeof foo === 'bar'
1 === 1

Only cases that can be statically verified to be the same type are fixed. (This uses the same logic as the rule's "smart" option).

Is there anything you'd like reviewers to focus on?

Nothing in particular.

@not-an-aardvark not-an-aardvark added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Oct 18, 2016
@not-an-aardvark not-an-aardvark self-assigned this Oct 18, 2016
@mention-bot
Copy link

@not-an-aardvark, thanks for your PR! By analyzing the history of the files in this pull request, we identified @alberto, @sstur and @ilyavolodin to be potential reviewers.

@eslintbot
Copy link

LGTM

Copy link
Member

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@gyandeeps
Copy link
Member

gyandeeps commented Oct 28, 2016

should we mention in docs abt the only case we are fixing?

@eslintbot
Copy link

LGTM

@not-an-aardvark
Copy link
Member Author

Good idea, added a note to the docs.

@eslintbot
Copy link

LGTM

@nzakas nzakas removed the CLA: Valid label Oct 31, 2016
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nzakas nzakas added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Nov 1, 2016
@nzakas nzakas merged commit e58cead into master Nov 1, 2016
@not-an-aardvark not-an-aardvark deleted the eqeqeq-partial-fixer branch November 1, 2016 17:26
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
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 rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants