When applying // @ts-ignore fix as a group, apply to a line only once.#21413
Merged
2 commits merged intoJan 25, 2018
Merged
Conversation
ghost
commented
Jan 25, 2018
| fixId: undefined, | ||
| }]; | ||
| }, | ||
| fixIds: [fixId], // No point applying as a group, doing it once will fix all errors |
Author
There was a problem hiding this comment.
This comment is better written a few lines up -- no point applying the // @ts-nocheck fix as a group. There is a point applying // @ts-ignore as a group.
amcasey
approved these changes
Jan 25, 2018
| }); | ||
|
|
||
| function getIgnoreCommentLocationForLocation(sourceFile: SourceFile, position: number, newLineCharacter: string): TextChange { | ||
| function getIgnoreCommentLocationForLocation(sourceFile: SourceFile, position: number, newLineCharacter: string): { line: number, change: TextChange } { |
Member
There was a problem hiding this comment.
Unless there's an existing convention, I would be tempted to rename "line" to "lineNumber". At the call site, I couldn't figure out whether it was the line text or the line number. (Yes, I realize that using the line text would make no sense.)
This pull request was closed.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #21378