Skip to content

πŸ› Bug - biome format fails on every file for Windows devs (CRLF vs lineEnding lf)Β #2716

Open

Description

@PothieuG

Pain

On a Windows checkout, biome format . fails on effectively the whole repo:

Checked 672 files in 1639ms. No fixes applied.
Found 850 errors.

Figure: every diagnostic is a ␍ (carriage return), including in files nobody has touched

biome.json sets formatter.lineEnding: "lf", but Git for Windows checks files out with CRLF by default (core.autocrlf=true) and there is no .gitattributes normalising text files. So the working tree is CRLF and Biome wants LF, on every line of every file.

The practical effect for Windows devs:

  • biome format is unusable as a check β€” the signal is 100% noise
  • running biome format --write "fixes" it by rewriting all 677 files to LF, which produces an enormous diff and gets undone on the next checkout
  • a real formatting mistake is invisible among the CRLF diagnostics

CI is not affected (Linux checks out LF), and biome format isn't run in CI anyway β€” which is why this has gone unnoticed.

Acceptance Criteria

  1. biome format . passes on a fresh clone on Windows, macOS and Linux.
  2. Line endings are consistent across platforms and don't flip back on checkout.
  3. The one-off renormalisation is its own commit and doesn't pollute git blame.

Reproduce Steps

  1. Clone the repo on Windows with default Git settings (core.autocrlf=true).
  2. Run npx biome format ..
  3. Observe ~850 errors, all of them ␍, across files you have never edited.

Suggested fix

Add a .gitattributes with * text=auto eol=lf so every platform gets LF in the working tree, then renormalise once:

git add --renormalize .

Keep that renormalisation as a single isolated commit and add its SHA to .git-blame-ignore-revs, so it doesn't show up as the last author of every line.

Out of scope, but worth knowing

biome lint . currently reports 183 errors and 5725 warnings repo-wide. Adding a lint gate to CI is a separate, much larger piece of work β€” this PBI is only about making the formatter usable.

Activity

  1. added
    Type: DevOpsSetting up of DevOps processes e.g. GitHub Actions, Azure DevOps Pipelines etc
    Type: BugA problem with existing functionality
    on Sep 21, 2026
  2. added a commit that references this issue on Sep 21, 2026
    89182e4
  3. github-actions commented on Sep 21, 2026

    @github-actions
    Contributor

    Pull request created: #2717

    Generated by Issue Triage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs RefinementType: BugA problem with existing functionalityType: DevOpsSetting up of DevOps processes e.g. GitHub Actions, Azure DevOps Pipelines etc

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions