Skip to content

🐛 2.0.0-beta.1: disabling recommended rules do not disable every rule #5434

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

Open
1 task done
rubiesonthesky opened this issue Mar 24, 2025 · 2 comments
Open
1 task done
Labels
A-Core Area: core A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@rubiesonthesky
Copy link

Environment information

CLI:
  Version:                      2.0.0-beta.1
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v22.11.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         npm/11.1.0

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         <path>/biome.json
  Formatter enabled:            false
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  false

Linter:
  JavaScript enabled:           unset
  JSON enabled:                 unset
  CSS enabled:                  unset
  GraphQL enabled:              unset
  Recommended:                  false
  Enabled rules:

Workspace:
  Open Documents:               0

What happened?

Running command biome check --write ./src reports linter errors even if recommmended rules are false (like can be seen in the rage output).

It reports: "Found 433 errors". The errors that I can see are about test files and rule noDuplicateTestHooks.

Biome configuration file

{
  "assist": {
    "actions": {
      "source": {
        "organizeImports": {
          "level": "on"
        }
      }
    }
  },
  "formatter": {
    "enabled": false
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": false
    }
  }
}

Expected result

I did not expect any linter errors since no rule should be enabled. I wanted to test to enabling only noUnusedImports rule, but it was not possible.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@rubiesonthesky rubiesonthesky added the S-Needs triage Status: this issue needs to be triaged label Mar 24, 2025
@rubiesonthesky
Copy link
Author

rubiesonthesky commented Mar 24, 2025

This seems to be because test domain is enabled by default? https://next.biomejs.dev/linter/domains/

That page seems to be giving incorrect configuration, at least cli doesn't like it. But using this, I no longer get those linter errors. domains should be under linter, not under rules. Also, it doesn't accept on/ off, it accepts all / none / recommended.

{
  "linter": {
    "enabled": true,
    "domains": {
      "test": "none"
    },
    "rules": {
      "recommended": false
    }
  },
}

It would be nice, if there was an easy way to disable all rules, without surprised from domain rules. :)

@ematipico ematipico added A-Core Area: core A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug labels Mar 24, 2025
@github-actions github-actions bot removed the S-Needs triage Status: this issue needs to be triaged label Mar 24, 2025
@ematipico
Copy link
Member

You're right. Disabling the recommended rules should disable even the recommended rules from domains

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core Area: core A-Linter Area: linter S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

2 participants