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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Disabling one nursery group rule also disables other nursery group rules #2084

Closed
1 task done
risu729 opened this issue Mar 14, 2024 · 2 comments
Closed
1 task done

Comments

@risu729
Copy link
Contributor

risu729 commented Mar 14, 2024

Environment information

CLI:
  Version:                      1.6.1
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v21.6.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "bun/1.0.29"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

// biome.json
{
	"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
	"linter": {
		"rules": {
			"all": true,
			"nursery": {
				"noConsole": "off"
			}
		}
	}
}
// lint/nursery/noNodejsModules: not disabled in biome.json but not reported
import path from "node:path";

// lint/nursery/noConsole: disabled in biome.json
console.info(path.delimiter);

biome check . doesn't report any errors or warnings.

repo: https://github.com/risu729/biome-config-test

Expected result

Since linter.rules.all in biome.json is set to true, lint/nursery/noNodejsModules also should be reported.

I first thought linter.rules.all doesn't enable the nursery group rules, as mentioned in the docs.

Nursery rules require explicit opt-in via configuration on stable versions because they may still have bugs or performance problems

However, if the configuration doesn't disable any rules like below, the nursery group rules are enabled.

// biome.json
{
	"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
	"linter": {
		"rules": {
			"all": true
		}
	}
}

In addition, if I test the same thing with other groups, it works as expected.

For example, even if I disable the rule lint/style/noVar in configuration, lint/style/useConst is reported.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@Sec-ant
Copy link
Contributor

Sec-ant commented Mar 14, 2024

Duplicate of #2028. I believe this is already fixed in #2072. You can wait for the next release :)

@risu729
Copy link
Contributor Author

risu729 commented Mar 14, 2024

I'm so sorry for reporting a duplicating issue. Thank you so much for fixing it!

@risu729 risu729 closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants