Replies: 3 comments 1 reply
-
Oh yes, I know there is this philosophy, of course. It is "opinionated". And I know you probably get a lot of "but this rule is stupid, it should be possible to disable it"... So, nothing ever changes, the set of settings is final, even when those settings have no particular reason and sometimes are harmful to a point they need a work-around? |
Beta Was this translation helpful? Give feedback.
-
Biome always adds an extra newline at the end of files, and there is no option to change that. This helps maintain consistency across all the formatted files. It also makes it so that when you concatenate 2 files, they are syntactically valid without needing to add extra newlines. |
Beta Was this translation helpful? Give feedback.
-
Maybe I am missing something, but it seems there is no option to remove newline at the ending of a file.
That is an issue in prettier as well: prettier/prettier#6360
Maybe it could be an option in biome? Or an option to respect
.editorconfig
'sinsert_final_newline
or just to not touch new lines at all...I don't need final new lines added in some of my files, but still need them formatted. In some files they are actually harmful - say, in a template file with a single span inside - new lines add spaces in resulting HTML.
And, frankly, I think it is useless - it is 2025, there are usually no issues with new lines - so no need to enforce the rule. I need a good formatter, but something as basic needing workarounds is kind of frustrating. Currently I use a VSCode extension to remove final new lines (as the built-in VSCode option to trim newlines do not always work reliably, too...).
Beta Was this translation helpful? Give feedback.
All reactions