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

"++" changes the behavior code #153

Open
mlabanowicz opened this issue Oct 12, 2017 · 1 comment
Open

"++" changes the behavior code #153

mlabanowicz opened this issue Oct 12, 2017 · 1 comment

Comments

@mlabanowicz
Copy link

Example:

origin:
var i = 0;while (i < 10){console.log(i++);}
OUTPUT:
0,1,2,3,4,5,6,7,8,9

after fixmyjs:
var i = 0;while (i < 10){console.log(i += 1);}
OUTPUT:
1,2,3,4,5,6,7,8,9,10

@goatslacker
Copy link
Member

Yeah it does, it's one of those "use catiously" rules.

I usually like to run the rules by themselves and git diff after each fix run. Nowadays I'm using eslint --fix though, it's still a good workflow for any auto-fix tooling like codemods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants