Conversation
🦋 Changeset detectedLatest commit: 7f08221 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
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 |
WalkthroughThis PR promotes 22 linter rules from the nursery group into stable groups: 9 to Correctness, 8 to Suspicious, 3 to Complexity, and 2 to Style. Test/spec configuration files and directories are updated to reflect the new rule namespaces (nursery → style/correctness/suspicious/complexity). Several lint rule declarations gain explicit severity metadata. The ROME_CHANGELOG.md file is removed and a small metadata field was added to the UseExplicitType rule. Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
Comment |
There was a problem hiding this comment.
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 | 🟡 MinorAvoid marking this nursery rule as WIP unless it’s intentional.
Adding
issue_numbermakes 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.
| "@biomejs/biome": minor | ||
| --- | ||
|
|
||
| Promoted 24 nursery rules to stable groups. |
There was a problem hiding this comment.
Rule count doesn’t add up.
The lists sum to 22 (9+8+3+2), but the headline says 24. Please reconcile the count or add the two missing rules.
📝 Suggested tweak (if the list is complete)
-Promoted 24 nursery rules to stable groups.
+Promoted 22 nursery rules to stable groups.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Promoted 24 nursery rules to stable groups. | |
| Promoted 22 nursery rules to stable groups. |
🤖 Prompt for AI Agents
In @.changeset/promote-nursery-rules-to-stable.md at 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.
Conaclos
left a comment
There was a problem hiding this comment.
Have you taken care of reviewing the severity of each rule ?
Also, should we rename noDuplicateDependencies into noDuplicatePackageJsonDependencies?
|
@Conaclos |
Not really. You're more than welcome to provide some suggestions |
I was thinking about future rules for |
|
I'm also not a fan of lengthy names. IMO, the word "dependencies" implies that the rule is talking about package.json, so |
There was a problem hiding this comment.
I'm a bit wary of promoting this rule just yet. It still has some open bug reports
|
I pushed a commit that sets explicitly the severity level of the promoted rules. Here some thinkings / question:
|
There was a problem hiding this comment.
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.
| RuleSource::EslintVueJs("no-deprecated-data-object-declaration").inspired(), | ||
| RuleSource::EslintVueJs("no-shared-component-data").inspired(), | ||
| ], | ||
| severity: Severity::Warning, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check severity levels used by correctness rules
rg -n 'severity:\s*Severity::' crates/biome_js_analyze/src/lint/correctness/ | head -30Repository: biomejs/biome
Length of output: 3337
Change severity to Severity::Error.
This rule is in the correctness group but uses Severity::Warning. Per the contributing guidelines, correctness rules must use Severity::Error. Additionally, all other Vue correctness rules (noVueSetupPropsReactivityLoss, noVueReservedKeys, etc.) use Error. Since this rule detects deprecated Vue 3 patterns that won't work correctly, it should be Error, not Warning.
🤖 Prompt for AI Agents
In
`@crates/biome_js_analyze/src/lint/correctness/no_vue_data_object_declaration.rs`
at 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.
|
@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? |
| @@ -105,11 +105,11 @@ fn merge_override_linter_group_rule() { | |||
| ]))), | |||
| linter: Some(OverrideLinterConfiguration { | |||
| rules: Some(Rules { | |||
| nursery: Some(SeverityOrGroup::Group(Nursery { | |||
| use_explicit_type: Some(RuleConfiguration::Plain( | |||
| style: Some(SeverityOrGroup::Group(Style { | |||
There was a problem hiding this comment.
The test was failing because use_explicit_type was moved to style before the reverting of this change. To make the test more stable, I chose an already promoted rule (noDefaultExport).
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. |
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