biomejs / biome-vscode

Biome extension for Visual Studio Code and VSCodium
https://marketplace.visualstudio.com/items?itemName=biomejs.biome
Apache License 2.0
235 stars 32 forks source link

🐛 Biome Linting Runs in Projects Without Configuration or Dependency When VSCode Extension is Enabled #330

Open poteboy opened 2 months ago

poteboy commented 2 months ago

VS Code version

1.92.2

Extension version

2.3.0

Biome version

1.8.3

Operating system

Description

The Biome linter runs on projects where it is not configured or installed. Specifically, Biome executes linting even when:

Steps to reproduce

  1. Open a project in VSCode where Biome is not listed as a dependency in package.json.
  2. Ensure that there is no biome.json or similar configuration in the project.
  3. Confirm that the Biome is enabled (Biome 1.8.3 (bundled) as shown in the screenshot).
  4. Notice that Biome still runs linting on files (e.g., showing errors such as "This else clause can be omitted...").
スクリーンショット 2024-09-06 12 14 26

Expected behavior

Biome should not run linting in projects unless explicitly installed or configured within the project settings or dependency files.

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Link to a minimal reproduction

No response

Logs

No response

ArthurLobopro commented 2 months ago

I have the same problem, sometimes I open a project that uses ESLint or other linter but Biome keeps showing errors and as there is no biome configuration it shows all recomended errors

RexSkz commented 2 months ago

Switching to the pre-release version solves this issue for me. (Please refer to https://github.com/biomejs/biome/issues/1630)

Hope the support of multi-folder workspaces to be released soon!

unvalley commented 2 months ago

I think this will be resolved by the pre-release of v3, could you try that?

Set true to the biome.requireConfigFile: https://deploy-preview-974--biomejs.netlify.app/reference/vscode/#biomerequireconfigfile

kotasudhakar commented 2 months ago

There is still an issue i am facing when there is an biome extension installed but no biome json file is there in the repo, still the biome is showing those as errors. I dont want it as in this repo i have already prettier and eslint configured. I am using biome extension version 1.9.2

ematipico commented 2 months ago

@kotasudhakar did you follow the conversation? Did you try the pre-release with the new extension configuration?

If so, then please create a reproduction and open a new issue

tschaub commented 1 month ago

I was looking for a solution to this same issue and tried the latest pre-release (v2024.10.204580). When I add "biome.requireConfigFile": true to my user settings.json file, I get the following dialog when I open a JS file:

image

See #375 for details.