Skip to content

biome: use --stdin-file-path for fixer#5051

Merged
hsanson merged 1 commit intodense-analysis:masterfrom
apeschar:biome-fixer-stdin
Nov 22, 2025
Merged

biome: use --stdin-file-path for fixer#5051
hsanson merged 1 commit intodense-analysis:masterfrom
apeschar:biome-fixer-stdin

Conversation

@apeschar
Copy link
Contributor

@apeschar apeschar commented Oct 3, 2025

This PR changes the Biome fixer to use stdin with --stdin-file-path instead of a temporary file.

By using --stdin-file-path instead of a temporary file, Biome knows where the file is and applies the inclusion/exclusion rules from the configuration file appropriately.

The tests have been updated and all tests pass.

@hsanson
Copy link
Contributor

hsanson commented Oct 26, 2025

This looks like a breaking change. What this --stdin-file-path flag added recently to biome? if so would be better to check the tool version and add this flag only if supported.

@apeschar
Copy link
Contributor Author

I don't think it is a breaking change. Both the --write and --stdin-file-path flags were added in the same version 1.8.0, so this change should be compatible with every version of Biome that ALE currently works with (ie, 1.8.0 and up).

dev % ./node_modules/.bin/biome --version
Version: 1.7.3

dev % ./node_modules/.bin/biome check --write --stdin-file-path test.js <<<"hey"
Error: --write is not expected in this context
dev % ./node_modules/.bin/biome check --write test.js
Error: --write is not expected in this context
dev % ./node_modules/.bin/biome --version
Version: 1.8.0

dev % ./node_modules/.bin/biome check --write --stdin-file-path test.js <<<"hey"
hey;
dev % ./node_modules/.bin/biome check --write test.js
Checked 1 file in 874µs. No fixes needed.

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@hsanson hsanson merged commit 260c756 into dense-analysis:master Nov 22, 2025
8 checks passed
Caw3 pushed a commit to Caw3/ale that referenced this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants