Skip to content
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

🐛 disabled linter doesn't show errors but autofixes them anyways #491

Open
1 of 3 tasks
Akuukis opened this issue Feb 7, 2025 · 5 comments
Open
1 of 3 tasks
Labels

Comments

@Akuukis
Copy link

Akuukis commented Feb 7, 2025

VS Code version

1.96.2

Extension version

2.3.2

Biome version

1.9.4

Operating system

  • Windows
  • macOS
  • Linux

Description

In VSCode I don't see linter errors when linter is disabled but biome fixes them anyways, e.g. this rule https://biomejs.dev/linter/rules/use-arrow-function/

With the following biome config

{
  ...
  "linter": {
    "enabled": false // TODO: for later.
  }
}

and the following vscode workspace config

{
  ...
  "settings": {
    ...
    "[javascript]": {
      "editor.defaultFormatter": "biomejs.biome",
      "editor.codeActionsOnSave": {
        "source.fixAll.biome": "explicit"
      }
    },
  }
}

Steps to reproduce

  1. set settings as above
  2. restart VSCode just in case
  3. open any .js file with a function that should be arrow function instead
  4. notice that biome extension doesn't highlight it
  5. save the file
  6. notice that biome extension did auto-fix it

Expected behavior

Don't autofix linter rules when linter is disabled.
Also in other words, fix only what's displayed as fixable.

Does this issue occur when using the CLI directly?

No

Link to a minimal reproduction

No response

Logs

# Biome
[Info  - 1:46:09 PM] Server initialized with PID: 72361

# Biome LSP (/)
2025-02-07 13:45:05.952 [info] [Info  - 1:45:05 PM] Server initialized with PID: 72361
@Akuukis Akuukis added the Triage label Feb 7, 2025
@nhedger
Copy link
Member

nhedger commented Feb 7, 2025

Please provide a minimal reproduction repository

@nhedger nhedger added Needs reproduction Needs a reproduction Linux and removed Triage labels Feb 7, 2025
Copy link
Contributor

This issue has been automatically closed because it has been inactive for more than 3 days and it does not have a minimal reproduction.

@Akuukis
Copy link
Author

Akuukis commented Mar 6, 2025

@nhedger @shulandmimi please see the minimal reproduction repository here https://github.com/Akuukis/biome-repro

@nhedger nhedger removed the Needs reproduction Needs a reproduction label Mar 6, 2025
@nhedger nhedger reopened this Mar 6, 2025
@ematipico
Copy link
Member

@Akuukis

FYI to opt-in with the autofix on save, you need to use the source.fixAll.biome code action.

The code action quickfix.biome is needed to show the inline fix when using CMD+. shortcut when the cursor is inside the range of diagnostic

@Akuukis
Copy link
Author

Akuukis commented Mar 6, 2025

@ematipico thanks, I changed it (see commit) but the bug still stands as described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants