Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Jan 25, 2018

Fixes #21378

@@ -35,15 +35,21 @@ namespace ts.codefix {
fixId: undefined,
}];
},
fixIds: [fixId], // No point applying as a group, doing it once will fix all errors
Copy link
Author

Choose a reason for hiding this comment

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

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.

@ghost ghost requested a review from amcasey January 25, 2018 19:18
});

function getIgnoreCommentLocationForLocation(sourceFile: SourceFile, position: number, newLineCharacter: string): TextChange {
function getIgnoreCommentLocationForLocation(sourceFile: SourceFile, position: number, newLineCharacter: string): { line: number, change: TextChange } {
Copy link
Member

Choose a reason for hiding this comment

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

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.)

@ghost ghost merged commit 7c4e755 into master Jan 25, 2018
@ghost ghost deleted the codeFixDisable branch January 25, 2018 21:53
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant