-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
🐛 --apply / --write broken for vue files on stdin #2225
🐛 --apply / --write broken for vue files on stdin #2225
Comments
Another weird thing is that if I pipe a file to biome format --write or biome lint --apply individually they both output the formatted / linted content, but if I pipe a file into biome format --write then pipe it's output to biome lint --apply, I get nothing. If I remove the --apply on the biome lint, then it outputs the code just fine. |
After testing this with other file formats, I think this is only a problem with vue files. Piping a ts file into biome check --apply works like intended. So when I pipe a vue file into biome check --apply nothing is outputted back, if I dont use --apply, it does output what it would of done to the whole file. Piping a vue file to biome format outputs what it would of done to the whole file, but if I add the --write flag then it only outputs the script part, not the template part, thus breaking the rest of the pipe chain. |
The bug is probably here somewhere https://github.com/biomejs/biome/blob/main/crates/biome_cli/src/execute/std_in.rs |
Hello there! Perhaps I may have found the point.
However, for stdin, that process is missing. biome/crates/biome_cli/src/execute/std_in.rs Line 108 in 1f891f5
I am working on a PR #2686 right now. |
Environment information
What happened?
When I use biome lint --apply or biome format --write with a piped file and --stdin-file-path I get the formatted / linted code on stdout, but when I use biome check --apply nothing comes out. If I remove the --apply flag it outputs a list of what it would change.
Heres the actual command I use, $path is the absolute path to my project root and $target is the absolute file path for the file I want to lint
.
${path}node_modules/.bin/biome check --apply --config-path=${path} --colors=off --stdin-file-path=$target < $target
Expected result
I expect content piped to biome check --apply --stdin-file-path=xx to output the formatted, linted and sorted file to std out.
Code of Conduct
The text was updated successfully, but these errors were encountered: