-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
Biome should not parse when disabled / ignored #3749
Comments
The extension has no control over this behavior, so I'll move this to the main repo. |
Are you sure this is the case? When run directly, the Biome CLI outputs |
I am going ahead and close this issue as not planned. We will improve the documentation soon, but Biome is different from other tools, because Biome is meant to be a language server. A language server always attempts to parse a file, and it always emits parsing diagnostics regardless. That's the same behaviour you get from the TS language server. |
Thanks for the explanation. In this case, is it considered a bug that the extension always displays parse errors? IMO, it is surprising to see any output from an extension when it is not enabled for a specific file. |
If you disable the extension at all, you shouldn't get anything at all, but if the extension picks up any Biome binary (installed by your project or bundled), you'll always get syntax errors if any. That's how the TS language server works in VScode. The tiny difference is that TS language always works because it's bundled in the editor. |
I just tested this:
With VS Code's TS language server, this file displays errors when It may be the case that architecturally, Biome's LSP must parse any file with a qualifying language type. However, as the built-in TS LSP demonstrates, errors can (and should) only be surfaced to the user when validation/linting/formatting are enabled and the file isn't ignored. |
I'll think about it, thank you for your input. Feel free to open a discussion to make this proposal more visible. |
Coming here from biomejs/biome-vscode#222 (comment). I agree with @pikeas' points above. As it stands I have to choose between either disabling the Biome extension or enabling it and tolerating extraneous errors in CSS files, which is really distracting. For example: ![]() I could reduce parsing errors e.g. by enabling ![]() |
VS Code version
1.92.2
Extension version
2.3.0
Biome version
1.8.3
Operating system
Description
Biome parses CSS files with the following config:
This surfaced due to a parse error as described on #3107.
This issue is distinct from the parsing error - per the Biome config, CSS files are not in scope - they are not in
files.include
, and CSS formatting/linting are disabled.Biome should not display parse errors in this case, and ideally should not parse the files at all as there is no work to be done.
Steps to reproduce
Disable CSS formatting and linting, reload the Biome extension.
Expected behavior
No CSS parse errors displayed, no CSS parsing.
Does this issue occur when using the CLI directly?
Not applicable - CLI outputs
No files were processed in the specified paths.
The text was updated successfully, but these errors were encountered: