biomejs / biome-vscode

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

🐛 Quick Fix does not provide option to disable rule #220

Closed wesleylhandy closed 2 weeks ago

wesleylhandy commented 3 months ago

VS Code version

1.89

Extension version

2.2.2

Biome version

1.7.3

Operating system

Description

When Biome detects a lint warning or error, it used to allow a Quick Fix to disable the rule via a comment. No matter what settings I provide to VSCode, I am never given the option to disable.

Steps to reproduce

Below is a screenshot of the problem. No quick fixes available Screenshot 2024-05-16 at 10 28 29 AM

settings.json

    "[javascript]": {
        "editor.defaultFormatter": "biomejs.biome"
    },
    "[javascriptreact]": {
        "editor.defaultFormatter": "biomejs.biome"
    },
    "[json]": {
        "editor.defaultFormatter": "biomejs.biome"
    },
    "[jsonc]": {
        "editor.defaultFormatter": "biomejs.biome"
    },
    "[typescript]": {
        "editor.defaultFormatter": "biomejs.biome"
    },
    "[typescriptreact]": {
        "editor.defaultFormatter": "biomejs.biome"
    },
    "editor.codeActionsOnSave": {
        "quickfix.biome": "always"
    }

Expected behavior

I expect that any warning or error should provide the Quick Fix to disable the rule.

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Logs

No response

ematipico commented 3 months ago

Is it just that particular rule or any rule? Can you provide a reproduction?

wesleylhandy commented 3 months ago

@ematipico

Autofix seems to work for autofixable code, however, for no errors or warnings can I disable biome. EsLint and Prettier will provide the ability disable rules via a comment via the Quick Fix suggestions.

Here is a repo with a few examples of code that do not provide the ability to disable a rule via a comment via the Quick Fix suggestions.

https://github.com/wesleylhandy/vscode-biome-issue

Any rule should be able to be disabled via Quick Fix, reasons aside.