Skip to content
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

Implement autofix for no-implicit-coercion #7056

Closed
TheSavior opened this issue Sep 4, 2016 · 7 comments
Closed

Implement autofix for no-implicit-coercion #7056

TheSavior opened this issue Sep 4, 2016 · 7 comments
Assignees
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

Comments

@TheSavior
Copy link
Contributor

What version of ESLint are you using?
3.0.0

What parser (default, Babel-ESLint, etc.) are you using?
default

Please show your full configuration:
Seems unnecessary

What did you do? Please include the actual source code causing the issue.
I tried to use the --fix command with

"no-implicit-coercion": 2

What did you expect to happen?
I expected it to fix my source

What actually happened? Please include the actual, raw output from ESLint.
It gave me explicit recommendations on what to write in my code, but didn't make the actual changes.

@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Sep 4, 2016
@platinumazure platinumazure 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 and removed triage An ESLint team member will look at this issue soon labels Sep 4, 2016
@platinumazure
Copy link
Member

Just for the convenience of anyone perusing the issue, could you show the messages you receive so we can see exactly what fixes you have in mind?

@TheSavior
Copy link
Contributor Author

Yeah, I plan on digging into this. I updated the current tests with example fixes:

https://github.com/TheSavior/eslint/blob/fix-conversion/tests/lib/rules/no-implicit-coercion.js#L80

@TheSavior
Copy link
Contributor Author

Essentially, this rule right now reports exactly what to replace each node with. I recommend that when using the fix option, it just does that exact change.

@kaicataldo
Copy link
Member

👍 from me. Given that we already calculate the replacement for the error message, should be pretty straight forward!

@vitorbal
Copy link
Member

vitorbal commented Sep 7, 2016

👍 from me as well

@ilyavolodin
Copy link
Member

👍 Just need somebody to champion this now.

@platinumazure
Copy link
Member

I'll champion.

@platinumazure platinumazure 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 Sep 7, 2016
@platinumazure platinumazure self-assigned this Sep 7, 2016
@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

No branches or pull requests

6 participants