-
-
Notifications
You must be signed in to change notification settings - Fork 780
feat(formatter): trailing newline #8334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 1b63a75 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
8b279bb to
f2e5e48
Compare
CodSpeed Performance ReportMerging #8334 will not alter performanceComparing Summary
Footnotes
|
|
Not a fan of the option, but if there is user demand and proper documentation, then I don’t mind indeed. |
|
Also considered naming the option |
|
I share @arendjr 's sentiment. The logic is simple enough, so it's not a huge deal I suppose. |
Summary
This is a proposal to add
trailingNewlineto the Biome formatter.I would like to know what @biomejs/core-contributors and @biomejs/maintainers think about it.
I would plan to add this option as long as we document the unsafety of removing the trailing newline from the files. Hence, this will never be the default.
For example, there are various historical issues about files that don't have a newline:
A user also raised a concern regarding POSIX. However, this seems to be more bounced (I asked Claude Code about this)
Still, it seems to be a concern to acknowledge, and maybe document.
Here's what I was thinking:
Note
The majority of the code was created with Claude Code, but I to intervene too because at some point the AI didn't know how to connect the dots. The AI updated all the configs and tests.
I updated the snapshots to make the newline more evident, since it wasn't before. I wrote some gluecode to make the feature working via Workspace, and edited the changeset
Test Plan
New tests added.
Docs
TBD