Replies: 1 comment 4 replies
-
Unfortunately, the formatter doesn't know that that particular comment is special. There isn't much we can do for now. You can increase the line width to avoid collapsing or manually move the comment. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there,
I think this is not really a "bug", so let's start a discussion on it 😊
When we ran the biome formatter on our project the very first time, it was causing a couple of issues regarding TS directives that we placed in our code.
Code will pass the TS checks before formatting, but after formatting with e.g. 120 line width configured, the
ts-expect-error
will be misplaced and TS check won't pass any longer. We manually needed to check a couple of files and depending on the size of the project, this could take a while, hindering people from easily migrating.While working on changes, this might not be a big difficulty but doing smart replaces in the code base overall can also cause this to happen.
Example snippet:
See here: Playground-Link
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions