You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the "asi" option for semicolons, formatters will sometimes have to insert a semicolon at the beginning of a line. An example with dprint:
Input
letline1='hello';// Comment[].filter(x=>x)
Formatted
letline1="hello"// Comment;[].filter(x=>x)
However, if the code is already formatted, dprint will attach the comment to the first statement. Although technically the comment may be contained within the first statement, developers would typically understand the comment to belong to the latter statement and it would nice if dprint could handle this case.
Input Code
letline1="hello"// Comment;[].filter(x=>x)
Expected Output
letline1="hello"// Comment;[].filter(x=>x)
Actual Output
letline1="hello"// Comment;[].filter(x=>x)
The text was updated successfully, but these errors were encountered:
Describe the bug
dprint-plugin-typescript version: 0.88.10
When using the "asi" option for semicolons, formatters will sometimes have to insert a semicolon at the beginning of a line. An example with dprint:
Input
Formatted
However, if the code is already formatted, dprint will attach the comment to the first statement. Although technically the comment may be contained within the first statement, developers would typically understand the comment to belong to the latter statement and it would nice if dprint could handle this case.
Input Code
Expected Output
Actual Output
The text was updated successfully, but these errors were encountered: