Repository navigation
Description
Environment information
Details
CLI:
Version: 2.6.5
Color support: true
Platform:
CPU Architecture: aarch64
OS: macos
Environment:
BIOME_DISTRIBUTION: npm
BIOME_LOG_FILE: unset
BIOME_LOG_PATH: unset
BIOME_LOG_PREFIX_NAME: unset
BIOME_LOG_LEVEL: unset
BIOME_LOG_KIND: unset
BIOME_CONFIG_PATH: unset
BIOME_THREADS: unset
BIOME_WATCHER_KIND: unset
BIOME_WATCHER_POLLING_INTERVAL: unset
BIOME_BINARY: unset
RUST_BACKTRACE: unset
NO_COLOR: unset
TERM: xterm-256color
JS_RUNTIME_VERSION: v26.11.1
JS_RUNTIME_NAME: node
NODE_PACKAGE_MANAGER: unset
Biome Configuration:
Status: Loaded successfully.
Path: biome.json
Formatter enabled: true
Linter enabled: true
Assist enabled: true
VCS enabled: false
HTML full support enabled: unset
Files:
Ignore Unknown: unset
Includes: unset
Workspace:
Open Documents: 0What happened?
In 2.6.5, enabling nursery/useWhileLoopCondition in the config enables nursery/noDanglingUnderscore instead. useWhileLoopCondition doesn't run at all.
-
biome.json:{ "linter": { "rules": { "nursery": { "useWhileLoopCondition": "error" } } } } -
index.js:while (true) { if (!hasMore()) { break; } processNext(); } export const _private = 1;
-
biome lintreports only this, at the defaultinfoseverity:index.js:8:14 lint/nursery/noDanglingUnderscore
biome rage --linteralso listsnursery/noDanglingUnderscoreas enabled and doesn't listnursery/useWhileLoopCondition. With 2.6.4 and the same files,biome lintreportslint/nursery/useWhileLoopConditionatindex.js:2:3as an error.biome lint --only=nursery/useWhileLoopConditionstill works in 2.6.5, because it selects the rule by name.
I think the cause is the u8 cast of the rule index in group_struct.rs#L59:
let rule_position = Literal::u8_unsuffixed(index as u8);That position is used as Self::GROUP_RULES[#rule_position] to build the RuleFilter for enabled and disabled rules. The nursery group has 269 rules in 2.6.5 (184 in 2.6.4), so indices 256 to 268 wrap around to 0 to 12. useWhileLoopCondition is index 268, which becomes 12, and index 12 is noDanglingUnderscore. The other 12 rules affected the same way are useVueVOnExact through useVueValidVSlot.
The cast is older than 2.6.5. It started to matter with af84fb4 (#12765, noChainedComparison), which was the 257th nursery rule. Its parent has exactly 256. It's still on main.
I haven't built a fix. Literal::usize_unsuffixed(index) looks like the obvious change. A test that each group's generated RuleFilter matches its rule name would catch this the next time a group grows.
Expected result
"useWhileLoopCondition": "error" enables useWhileLoopCondition and nothing else, as in 2.6.4.
Code of Conduct
- I agree to follow Biome's Code of Conduct
Activity
biome-cookie commentedon Nov 5, 2026
Hello @finnan444, please provide a minimal reproduction. You MUST use one of the following options:
npm create @biomejs/biome-reproductionThese formats help us triage and fix issues faster. Failing to use these formats may cause your issue to be ignored or closed.
Issues marked with
S-Needs reprowill be closed if they have no activity within 3 days.finnan444 commentedon Nov 5, 2026
Reproduction repo: https://github.com/finnan444/biome-repro-12954
npm install && npx biome lintshows thenoDanglingUnderscorediagnostic on 2.6.5 and theuseWhileLoopConditionone on 2.6.4.The playground can't show this. With a single rule selected it also passes the rule as
only, which selects it by name, the same as--onlyon the CLI, and that path isn't affected.ematipico commentedon Nov 5, 2026
cc @dyc3
This feels like a nasty bug we should fix ASAP
Update dependency @biomejs/biome to v2.6.6 (#2246)
Update dependency @biomejs/biome to v2.6.6 (#73)
Update dependency @biomejs/biome to v2.6.6 (#31)
chore(deps): update dependency @biomejs/biome to v2.6.6 (#800)