tools: Implement automatic fix for no-let-in-for-declaration#16642
Closed
starkwang wants to merge 1 commit intonodejs:masterfrom
Closed
tools: Implement automatic fix for no-let-in-for-declaration#16642starkwang wants to merge 1 commit intonodejs:masterfrom
starkwang wants to merge 1 commit intonodejs:masterfrom
Conversation
apapirovski
reviewed
Oct 31, 2017
Contributor
apapirovski
left a comment
There was a problem hiding this comment.
Hi @starkwang, thanks for working on this! Could you expand the test in test/parallel/test-eslint-no-let-in-for-declaration.js to test the fixer (output prop)?
See a sample of how it works here https://github.com/eslint/eslint/blob/master/tests/lib/rules/arrow-body-style.js
ebda2cb to
ae9b2c6
Compare
Contributor
Author
|
@apapirovski I've just added the test for fixer |
apapirovski
approved these changes
Nov 1, 2017
Contributor
Member
|
Basically LGTM, just note that automatic fixing can introduce bugs if another variable of the same name was declared within the function. |
Member
|
@tniessen I think we can rely on code reviews for that. If the author does not notice it themselves after running |
gireeshpunathil
approved these changes
Nov 1, 2017
Contributor
|
Landed in 04ffa36 |
cjihrig
pushed a commit
to cjihrig/node
that referenced
this pull request
Nov 6, 2017
PR-URL: nodejs#16642 Refs: nodejs#16636 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Merged
3 tasks
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs: #16636
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
tools