Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Comments

feat: promote rules for v2.4#9011

Merged
ematipico merged 16 commits intonextfrom
feat/promote-rules-v2.4
Feb 14, 2026
Merged

feat: promote rules for v2.4#9011
ematipico merged 16 commits intonextfrom
feat/promote-rules-v2.4

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented Feb 9, 2026

Summary

This PR promotes various rules to stable. I used the help of AI to create a plan and run the scripts for moving a rule.

Test Plan

Green CI

Docs

Not needed

@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2026

🦋 Changeset detected

Latest commit: 6b1a21f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@biomejs/biome Minor
@biomejs/cli-win32-x64 Minor
@biomejs/cli-win32-arm64 Minor
@biomejs/cli-darwin-x64 Minor
@biomejs/cli-darwin-arm64 Minor
@biomejs/cli-linux-x64 Minor
@biomejs/cli-linux-arm64 Minor
@biomejs/cli-linux-x64-musl Minor
@biomejs/cli-linux-arm64-musl Minor
@biomejs/wasm-web Minor
@biomejs/wasm-bundler Minor
@biomejs/wasm-nodejs Minor
@biomejs/backend-jsonrpc Patch
@biomejs/js-api Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added A-CLI Area: CLI A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS L-JSON Language: JSON and super languages A-Diagnostic Area: diagnostocis labels Feb 9, 2026
@ematipico ematipico changed the title feat: promote rules feat: promote rules for v4 Feb 9, 2026
@ematipico ematipico changed the title feat: promote rules for v4 feat: promote rules for v2.4 Feb 9, 2026
@dyc3 dyc3 added this to the Biome v2.4 milestone Feb 9, 2026
@ematipico ematipico marked this pull request as ready for review February 9, 2026 17:34
@ematipico ematipico requested review from a team February 9, 2026 17:34
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 9, 2026

Walkthrough

This PR promotes 21 nursery linting rules to stable groups—Correctness, Suspicious, Complexity, and Style—each assigned appropriate default severity levels (Error, Warning, or Information). The changes update lint rule declarations across multiple crates (JavaScript, GraphQL, CSS, HTML) to reflect the new groupings, reorganise test configuration files, and remove the ROME_CHANGELOG.md file.

Possibly related PRs

Suggested reviewers

  • dyc3
  • Conaclos
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (66 files):

⚔️ .claude/skills/README.md (content)
⚔️ .claude/skills/testing-codegen/SKILL.md (content)
⚔️ AGENTS.md (content)
⚔️ crates/biome_analyze/src/diagnostics.rs (content)
⚔️ crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs (content)
⚔️ crates/biome_cli/tests/cases/handle_svelte_files.rs (content)
⚔️ crates/biome_cli/tests/cases/handle_vue_files.rs (content)
⚔️ crates/biome_cli/tests/snapshots/main_commands_lint/lint_only_group_skip_rule.snap (content)
⚔️ crates/biome_cli/tests/snapshots/main_commands_lint/linter_shows_the_default_severity_of_rule_on.snap (content)
⚔️ crates/biome_cli/tests/snapshots/main_configuration/incorrect_rule_name.snap (content)
⚔️ crates/biome_configuration/src/analyzer/linter/rules.rs (content)
⚔️ crates/biome_configuration/src/generated/domain_selector.rs (content)
⚔️ crates/biome_diagnostics_categories/src/categories.rs (content)
⚔️ crates/biome_html_analyze/src/lint/a11y/no_redundant_alt.rs (content)
⚔️ crates/biome_html_analyze/src/lint/a11y/no_svg_without_title.rs (content)
⚔️ crates/biome_html_syntax/src/lib.rs (content)
⚔️ crates/biome_js_analyze/src/lint/a11y/no_svg_without_title.rs (content)
⚔️ crates/biome_js_analyze/src/lint/nursery/no_shadow.rs (content)
⚔️ crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-01.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-02.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-03.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-04.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-05.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-06.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-07.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-08.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-10.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-11.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-12.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-13.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-14.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-15.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-16.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-17.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-18.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-19.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-20.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-21.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-22.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-23.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-24.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-25.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-26.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-27.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-28.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-29.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-30.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-31.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/eslint/invalid-32.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/invalid.js.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-01.ts.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-02.ts.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-03.ts.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-04.ts.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-05.ts.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-06.ts.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-07.ts.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-08.ts.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts.snap (content)
⚔️ crates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalidArguments.ts.snap (content)
⚔️ crates/biome_service/src/file_handlers/html.rs (content)
⚔️ crates/biome_service/src/settings.tests.rs (content)
⚔️ packages/@biomejs/backend-jsonrpc/src/workspace.ts (content)
⚔️ packages/@biomejs/biome/configuration_schema.json (content)
⚔️ xtask/rules_check/src/lib.rs (content)

These conflicts must be resolved before merging into next.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: promoting linting rules to stable status for version 2.4.
Description check ✅ Passed The description directly relates to the changeset by explaining that various rules are being promoted to stable, mentions AI assistance for planning, and provides a test plan.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/promote-rules-v2.4
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch feat/promote-rules-v2.4
  • Create stacked PR with resolved conflicts
  • Post resolved changes as copyable diffs in a comment

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs (1)

324-335: ⚠️ Potential issue | 🟡 Minor

Avoid marking this nursery rule as WIP unless it’s intentional.

Adding issue_number makes the rule appear work‑in‑progress in diagnostics/website. If this isn’t explicitly WIP or tracked for external observers, please drop it (or add a short rationale in the PR).
Based on learnings, “In Rust lint rules under the nursery category, the issue_number field in declare_lint_rule! is optional and should not be added unless there is a compelling reason.”

🔧 Suggested change
-        issue_number: Some("2017"),
🤖 Fix all issues with AI agents
In @.changeset/promote-nursery-rules-to-stable.md:
- Line 5: The headline "Promoted 24 nursery rules to stable groups." is
inconsistent with the enumerated lists that sum to 22 (9+8+3+2); either update
the headline to "Promoted 22 nursery rules to stable groups." or add the two
missing rule entries into the lists so the totals match. Locate the sentence
"Promoted 24 nursery rules to stable groups." in
.changeset/promote-nursery-rules-to-stable.md and either change the numeric
count or append the two missing rule names to the appropriate group lists so the
arithmetic (9+8+3+2 or revised group totals) equals the headline, and ensure any
summary or changelog metadata reflects the corrected total.

Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you taken care of reviewing the severity of each rule ?

Also, should we rename noDuplicateDependencies into noDuplicatePackageJsonDependencies?

@dyc3 dyc3 self-requested a review February 10, 2026 02:28
@dyc3
Copy link
Contributor

dyc3 commented Feb 10, 2026

@Conaclos noDuplicateDependencies seems perfectly clear to me. Why the extra specificity to name it noDuplicatePackageJsonDependencies?

@ematipico
Copy link
Member Author

Have you taken care of reviewing the severity of each rule ?

Not really. You're more than welcome to provide some suggestions

@Conaclos
Copy link
Member

@dyc3

noDuplicateDependencies seems perfectly clear to me. Why the extra specificity to name it noDuplicatePackageJsonDependencies?

I was thinking about future rules for package.json linting such as useValidPackageJsonEngines. I thought that renaming noDuplicateDependencies to noDuplicatePackageJsonDependencies could make it more consistent. Although I am not fond of the lengthy names. What do you think?

@dyc3
Copy link
Contributor

dyc3 commented Feb 10, 2026

I'm also not a fan of lengthy names. IMO, the word "dependencies" implies that the rule is talking about package.json, so noDuplicateDependencies is enough to get the idea across.

@Conaclos
Copy link
Member

I pushed a commit that sets explicitly the severity level of the promoted rules.

Here some thinkings / question:

  1. Should the severity of lint/correctness/noNextAsyncClientComponent be set to Error?
  2. Should we move lint/correctness/noVueDataObjectDeclaration to suspicious? I set its severity to Warning. If we keep the rule under correctness, does this make sense of setting its severity to Error?
  3. lint/correctness/noVueDuplicateKeys should be moved to the suspicious group because usually we place noDuplicate* rules in the suspicious group. However, I noted that its severity is set to Error instead of Warning. Is duplicate key a hard error in Vue? If it is an hard error, then it seems ok to keep the rule under correctness.
  4. I think that lint/suspicious/noShaadow should be moved to complexity or style. If we move the rule we could even consider setting its severity to Information.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@crates/biome_js_analyze/src/lint/correctness/no_vue_data_object_declaration.rs`:
- Line 106: The rule "no_vue_data_object_declaration" in
crates/biome_js_analyze/src/lint/correctness/no_vue_data_object_declaration.rs
currently sets severity to Severity::Warning; update that severity to
Severity::Error so the correctness rule aligns with the contributing guidelines
and other Vue correctness rules (e.g., noVueSetupPropsReactivityLoss,
noVueReservedKeys). Locate the severity: Severity::Warning entry in the rule
definition and change it to Severity::Error.

@ematipico
Copy link
Member Author

ematipico commented Feb 13, 2026

@Conaclos please update the changset to reflect your changes. Plus you must update the snapshots too.

You also changed the severity of other rules weren't promoted. Why that?

@Conaclos
Copy link
Member

You also changed the severity of other rules weren't promoted. Why that?

Only one. However, this doesn't change its severity level because it matched the default one. Anyway I reverted this change.

I had to fix a test that made the compilation fails. Strangely the CI didn't fail. This it must skip some tests.

@ematipico
Copy link
Member Author

Only one. However, this doesn't change its severity level because it matched the default one. Anyway I reverted this change.

Thank you. It was misleading and it doesn't make much sense to change it if there's a default already

@ematipico ematipico force-pushed the feat/promote-rules-v2.4 branch from 7f08221 to 1053073 Compare February 14, 2026 14:03
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 14, 2026

Merging this PR will not alter performance

✅ 58 untouched benchmarks
⏩ 95 skipped benchmarks1


Comparing feat/promote-rules-v2.4 (6b1a21f) with next (c047e86)

Open in CodSpeed

Footnotes

  1. 95 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@ematipico
Copy link
Member Author

I demoted noShadow

@ematipico ematipico requested review from Conaclos and dyc3 February 14, 2026 14:15
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.changeset/promote-nursery-rules-to-stable.md:
- Around line 17-20: The changeset text incorrectly states the default severity
for noVueDataObjectDeclaration as `warn`—update the description to `error` since
the rule implementation omits an explicit severity and the macro defaults to
`error`; also verify noNextAsyncClientComponent: if its severity was
intentionally set to `warn` in the rule implementation keep the changeset note
as-is, otherwise change its listed default to `error` to match the guideline
that correctness rules default to `error` (refer to the rule names
noVueDataObjectDeclaration and noNextAsyncClientComponent when locating and
editing the changeset text).
🧹 Nitpick comments (1)
.changeset/promote-nursery-rules-to-stable.md (1)

23-24: Optional: Consider adding a comma for readability.

"Vue 3 setup which causes" could read slightly better as "Vue 3 setup, which causes" — but this is purely a stylistic nit.

📝 Suggested tweak
-- [`noVueSetupPropsReactivityLoss`](https://biomejs.dev/linter/rules/no-vue-setup-props-reactivity-loss/). The rule reports destructuring of props in Vue 3 setup which causes reactivity loss.
+- [`noVueSetupPropsReactivityLoss`](https://biomejs.dev/linter/rules/no-vue-setup-props-reactivity-loss/). The rule reports destructuring of props in Vue 3 setup, which causes reactivity loss.

@ematipico
Copy link
Member Author

For some reason, the code in rules_check was modified, and it stopped catching bugs. I re-enabled it, and addressed the problems

@github-actions github-actions bot added A-Tooling Area: internal tools L-HTML Language: HTML and super languages labels Feb 14, 2026
@ematipico ematipico merged commit e014336 into next Feb 14, 2026
26 checks passed
@ematipico ematipico deleted the feat/promote-rules-v2.4 branch February 14, 2026 15:00
@github-actions github-actions bot mentioned this pull request Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project A-Tooling Area: internal tools L-CSS Language: CSS L-HTML Language: HTML and super languages L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants