Skip to content

Conversation

@ycmjason
Copy link
Owner

@ycmjason ycmjason commented Jul 25, 2025

This implementation leverage the fact that TypeScript's AST does not contain comment as nodes.

When we see @ts-migrating, we ignore the plugin errors in the next AST node's line.

This however mean that @ts-migrating will now not only skip subsequent comment lines, but also empty lines. For example:

// @ts-migrating

// bunch of words and empty lines

problematicLine();

This will still convert the problematicLine() to the old tsconfig.

I am not 100% sure if this is a good behaviour... @m-basov thoughts?

fixes #5

@ycmjason ycmjason mentioned this pull request Jul 25, 2025
@ycmjason ycmjason force-pushed the ignore-comments-below-directive branch from a02ddfa to 9929922 Compare August 5, 2025 21:10
@ycmjason ycmjason merged commit e62a25b into main Aug 7, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

Ignore comment lines after @ts-migrating comment

1 participant