Skip to content

🐛 Line endings are ignored (CRLF) #711

@baptistemarchand

Description

@baptistemarchand

VS Code version

1.101.2

Extension version

3.1.0

Biome version

2.1.1

Operating system

  • Windows
  • macOS
  • Linux

Description

The VSCode extension is not removing \r characters at the end of lines (but the CLI is).

Steps to reproduce

Here is a repo : https://github.com/baptistemarchand/biome-crlf
The file crlf.ts contains windows style line endings.
Running yarn biome format shows errors :

Image

Open the file in VSCode and save.
The line endings are not fixed (the repo includes a .vscode/settings.json file with editor.formatOnSave: true).

Expected behavior

I expected the line endings to be fixed (\r\n => \n) when I saved the file.

If I use the CLI (yarn biome format --fix), it works as expected.

Does this issue occur when using the CLI directly?

No

Link to a minimal reproduction

https://github.com/baptistemarchand/biome-crlf

Logs


Metadata

Metadata

Assignees

No one assigned

    Labels

    Help wantedExternal contributions are welcome

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions