diff --git a/.changeset/dry-birds-design.md b/.changeset/dry-birds-design.md
new file mode 100644
index 000000000000..d11d7005e6af
--- /dev/null
+++ b/.changeset/dry-birds-design.md
@@ -0,0 +1,5 @@
+---
+"@biomejs/biome": patch
+---
+
+Improved the diagnostics of the rules `useSortedClasses` and `noUnnecessaryConditions`. The diagnostics now state that these rules are a work in progress and link to the relevant GitHub issue.
diff --git a/crates/biome_analyze/CONTRIBUTING.md b/crates/biome_analyze/CONTRIBUTING.md
index 486a482b42d0..e3e2f8c2d957 100644
--- a/crates/biome_analyze/CONTRIBUTING.md
+++ b/crates/biome_analyze/CONTRIBUTING.md
@@ -20,6 +20,7 @@ The analyzer allows implementors to create **three different** types of rules:
- [Naming Conventions for Rules](#naming-conventions-for-rules)
- [What a Rule should say to the User](#what-a-rule-should-say-to-the-user)
- [Placement of New Rules](#placement-of-new-rules)
+ + [Mark a rule as a work in progress](#mark-a-rule-as-a-work-in-progress)
+ [Creating and Implementing the Rule](#creating-and-implementing-the-rule)
+ [Coding Tips for Rules](#coding-tips-for-rules)
- [`declare_lint_rule!` macro](#declare_lint_rule-macro)
@@ -219,6 +220,26 @@ New rules **must** be placed inside the `nursery` group. This group is meant as
>
> If you aren't familiar with Biome's APIs, this is an option that you have. If you decide to use this option, you should make sure to describe your plan in an issue.
+### Mark a rule as a work in progress
+
+Sometimes nursery rules aren't completed yet – missing use cases, code actions, etc. – and you might want to communicate that to your users.
+
+You can add `issue_number` to the rule macro, and Biome will:
+- Add a footnote to the diagnostic of the rule with a link to the issue, e.g. `https://github.com/biomejs/biome/issues/1111`
+- Add a note on the website, with a link to the issue.
+
+```rust
+declare_lint_rule! {
+ /// Docs
+ pub(crate) NoVar {
+ version: "next",
+ name: "noVar",
+ language: "js",
+ issue_number: Some("1111"),
+ }
+}
+```
+
### Creating and Implementing the Rule
Let's say we want to create a new **lint** rule called `useMyRuleName`, follow these steps:
diff --git a/crates/biome_analyze/src/rule.rs b/crates/biome_analyze/src/rule.rs
index 00e9891b485c..429f26d9b2a1 100644
--- a/crates/biome_analyze/src/rule.rs
+++ b/crates/biome_analyze/src/rule.rs
@@ -44,6 +44,9 @@ pub struct RuleMetadata {
pub severity: Severity,
/// Domains applied by this rule
pub domains: &'static [RuleDomain],
+ /// Use this field to tag the rule as being worked, which means the rule is still far from being completed.
+ /// Possible bugs should be reported in that issue.
+ pub issue_number: Option<&'static str>,
}
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
@@ -609,6 +612,7 @@ impl RuleMetadata {
sources: &[],
severity: Severity::Information,
domains: &[],
+ issue_number: None,
}
}
@@ -647,6 +651,11 @@ impl RuleMetadata {
self
}
+ pub const fn issue_number(mut self, issue_number: Option<&'static str>) -> Self {
+ self.issue_number = issue_number;
+ self
+ }
+
pub fn applicability(&self) -> Applicability {
self.fix_kind
.try_into()
diff --git a/crates/biome_analyze/src/signals.rs b/crates/biome_analyze/src/signals.rs
index 805e535d63cf..adfd0a23e85f 100644
--- a/crates/biome_analyze/src/signals.rs
+++ b/crates/biome_analyze/src/signals.rs
@@ -9,7 +9,7 @@ use crate::{
registry::{RuleLanguage, RuleRoot},
rule::Rule,
};
-use biome_console::MarkupBuf;
+use biome_console::{MarkupBuf, markup};
use biome_diagnostics::{Applicability, CodeSuggestion, Error, advice::CodeSuggestionAdvice};
use biome_rowan::{BatchMutation, Language};
use std::iter::FusedIterator;
@@ -376,6 +376,13 @@ where
R::diagnostic(&ctx, &self.state).map(|mut diagnostic| {
diagnostic.severity = ctx.metadata().severity;
+
+ if let Some(issue_number) = ctx.metadata().issue_number {
+ let url = format!("https://github.com/biomejs/biome/issues/{}", issue_number);
+ diagnostic = diagnostic.note(markup! {
+ "This rule is still being actively worked on, so it may be missing features or have rough edges. Visit "{url.as_str()}" for more information or to report possible bugs."
+ });
+ }
AnalyzerDiagnostic::from(diagnostic)
})
}
diff --git a/crates/biome_js_analyze/src/lint/nursery/no_unnecessary_conditions.rs b/crates/biome_js_analyze/src/lint/nursery/no_unnecessary_conditions.rs
index b4f3aefa4e0e..eed6b69a00f8 100644
--- a/crates/biome_js_analyze/src/lint/nursery/no_unnecessary_conditions.rs
+++ b/crates/biome_js_analyze/src/lint/nursery/no_unnecessary_conditions.rs
@@ -91,6 +91,7 @@ declare_lint_rule! {
recommended: false,
severity: Severity::Warning,
domains: &[RuleDomain::Project],
+ issue_number: Some("6611"),
}
}
diff --git a/crates/biome_js_analyze/src/lint/nursery/use_sorted_classes.rs b/crates/biome_js_analyze/src/lint/nursery/use_sorted_classes.rs
index fbf03fbf7a48..27d826aa8967 100644
--- a/crates/biome_js_analyze/src/lint/nursery/use_sorted_classes.rs
+++ b/crates/biome_js_analyze/src/lint/nursery/use_sorted_classes.rs
@@ -156,6 +156,7 @@ declare_lint_rule! {
language: "js",
recommended: false,
fix_kind: FixKind::Unsafe,
+ issue_number: Some("1274"),
}
}
diff --git a/crates/biome_js_analyze/tests/specs/nursery/noUnnecessaryConditions/invalid.js.snap b/crates/biome_js_analyze/tests/specs/nursery/noUnnecessaryConditions/invalid.js.snap
index a2c7e307cde0..c1fc2ab818f8 100644
--- a/crates/biome_js_analyze/tests/specs/nursery/noUnnecessaryConditions/invalid.js.snap
+++ b/crates/biome_js_analyze/tests/specs/nursery/noUnnecessaryConditions/invalid.js.snap
@@ -166,6 +166,8 @@ invalid.js:4:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -185,6 +187,8 @@ invalid.js:8:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -204,6 +208,8 @@ invalid.js:12:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -223,6 +229,8 @@ invalid.js:16:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -242,6 +250,8 @@ invalid.js:20:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -260,6 +270,8 @@ invalid.js:25:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -279,6 +291,8 @@ invalid.js:29:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -298,6 +312,8 @@ invalid.js:33:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -317,6 +333,8 @@ invalid.js:37:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -336,6 +354,8 @@ invalid.js:41:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -355,6 +375,8 @@ invalid.js:45:8 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -373,6 +395,8 @@ invalid.js:51:17 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -391,6 +415,8 @@ invalid.js:54:17 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -409,6 +435,8 @@ invalid.js:57:17 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -428,6 +456,8 @@ invalid.js:58:17 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -446,6 +476,8 @@ invalid.js:61:15 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the comparison.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -465,6 +497,8 @@ invalid.js:62:15 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the comparison.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -484,6 +518,8 @@ invalid.js:63:15 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the comparison.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -503,6 +539,8 @@ invalid.js:64:15 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the comparison.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -522,6 +560,8 @@ invalid.js:65:15 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the comparison.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -541,6 +581,8 @@ invalid.js:66:15 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the comparison.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -559,6 +601,8 @@ invalid.js:69:8 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -578,6 +622,8 @@ invalid.js:74:8 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -597,6 +643,8 @@ invalid.js:81:10 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -615,6 +663,8 @@ invalid.js:84:8 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -634,6 +684,8 @@ invalid.js:88:8 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -658,6 +710,8 @@ invalid.js:93:18 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i The type being accessed is guaranteed to be non-nullish, making coalescing redundant.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -684,6 +738,8 @@ invalid.js:94:18 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i The type being accessed is guaranteed to be non-nullish, making coalescing redundant.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -710,6 +766,8 @@ invalid.js:95:18 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i The type being accessed is guaranteed to be non-nullish, making coalescing redundant.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -728,6 +786,8 @@ invalid.js:98:16 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -747,6 +807,8 @@ invalid.js:99:16 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -773,6 +835,8 @@ invalid.js:100:16 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i The type being accessed is guaranteed to be non-nullish, making coalescing redundant.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -797,6 +861,8 @@ invalid.js:104:19 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i The type being accessed is guaranteed to be non-nullish, making optional chaining redundant.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -823,6 +889,8 @@ invalid.js:105:19 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i The type being accessed is guaranteed to be non-nullish, making optional chaining redundant.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -842,6 +910,8 @@ invalid.js:109:7 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -860,6 +930,8 @@ invalid.js:113:10 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -878,6 +950,8 @@ invalid.js:117:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -897,6 +971,8 @@ invalid.js:118:7 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -915,6 +991,8 @@ invalid.js:124:9 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -934,6 +1012,8 @@ invalid.js:135:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -953,5 +1033,7 @@ invalid.js:141:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
diff --git a/crates/biome_js_analyze/tests/specs/nursery/noUnnecessaryConditions/invalid.ts.snap b/crates/biome_js_analyze/tests/specs/nursery/noUnnecessaryConditions/invalid.ts.snap
index 4ce7f90df44b..ee6aad25b012 100644
--- a/crates/biome_js_analyze/tests/specs/nursery/noUnnecessaryConditions/invalid.ts.snap
+++ b/crates/biome_js_analyze/tests/specs/nursery/noUnnecessaryConditions/invalid.ts.snap
@@ -164,6 +164,8 @@ invalid.ts:5:7 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -183,6 +185,8 @@ invalid.ts:12:7 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -201,6 +205,8 @@ invalid.ts:34:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -220,6 +226,8 @@ invalid.ts:38:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -239,6 +247,8 @@ invalid.ts:42:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -258,6 +268,8 @@ invalid.ts:46:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -277,6 +289,8 @@ invalid.ts:50:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -295,6 +309,8 @@ invalid.ts:55:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -314,6 +330,8 @@ invalid.ts:59:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -333,6 +351,8 @@ invalid.ts:63:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -352,6 +372,8 @@ invalid.ts:67:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -371,6 +393,8 @@ invalid.ts:71:5 lint/nursery/noUnnecessaryConditions ━━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -390,6 +414,8 @@ invalid.ts:86:10 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -409,6 +435,8 @@ invalid.ts:91:10 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -427,6 +455,8 @@ invalid.ts:95:17 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -446,6 +476,8 @@ invalid.ts:96:17 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -464,6 +496,8 @@ invalid.ts:99:15 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the comparison.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -483,6 +517,8 @@ invalid.ts:100:15 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the comparison.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -502,6 +538,8 @@ invalid.ts:101:15 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the comparison.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -521,6 +559,8 @@ invalid.ts:102:15 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the comparison.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -539,6 +579,8 @@ invalid.ts:105:8 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -558,6 +600,8 @@ invalid.ts:110:8 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -577,6 +621,8 @@ invalid.ts:117:10 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -595,6 +641,8 @@ invalid.ts:120:8 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -614,6 +662,8 @@ invalid.ts:124:8 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -632,6 +682,8 @@ invalid.ts:139:16 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -650,6 +702,8 @@ invalid.ts:140:16 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i Remove the condition.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
@@ -672,5 +726,7 @@ invalid.ts:141:16 lint/nursery/noUnnecessaryConditions ━━━━━━━━
i The type being accessed is guaranteed to be non-nullish, making coalescing redundant.
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/6611 for more information or to report possible bugs.
+
```
diff --git a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/codeOptionsUnsorted.jsx.snap b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/codeOptionsUnsorted.jsx.snap
index 14b1d4cad022..30d0e2aa36ef 100644
--- a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/codeOptionsUnsorted.jsx.snap
+++ b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/codeOptionsUnsorted.jsx.snap
@@ -1,7 +1,6 @@
---
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: codeOptionsUnsorted.jsx
-snapshot_kind: text
---
# Input
```jsx
@@ -73,6 +72,8 @@ codeOptionsUnsorted.jsx:4:13 lint/nursery/useSortedClasses FIXABLE ━━━
5 │
6 │ {/* SHOULD emit diagnostics (customClassAttribute attribute specified in options) */}
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
2 2 │ {/* attributes */}
@@ -97,6 +98,8 @@ codeOptionsUnsorted.jsx:5:17 lint/nursery/useSortedClasses FIXABLE ━━━
6 │ {/* SHOULD emit diagnostics (customClassAttribute attribute specified in options) */}
7 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
3 3 │ {/* SHOULD emit diagnostics (class/className attributes supported by default) */}
@@ -121,6 +124,8 @@ codeOptionsUnsorted.jsx:7:28 lint/nursery/useSortedClasses FIXABLE ━━━
8 │ {/* SHOULD NOT emit diagnostics (notClassAttribute attribute NOT specified in options) */}
9 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
5 5 │
@@ -145,6 +150,8 @@ codeOptionsUnsorted.jsx:12:13 lint/nursery/useSortedClasses FIXABLE ━━━
13 │
14 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
10 10 │ {/* utility sorting */}
@@ -169,6 +176,8 @@ codeOptionsUnsorted.jsx:13:13 lint/nursery/useSortedClasses FIXABLE ━━━
14 │
15 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
11 11 │ {/* SHOULD emit diagnostics (class attribute supported by default) */}
@@ -193,6 +202,8 @@ codeOptionsUnsorted.jsx:14:13 lint/nursery/useSortedClasses FIXABLE ━━━
15 │
16 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
12 12 │
@@ -217,6 +228,8 @@ codeOptionsUnsorted.jsx:15:13 lint/nursery/useSortedClasses FIXABLE ━━━
16 │
17 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
13 13 │
@@ -241,6 +254,8 @@ codeOptionsUnsorted.jsx:16:13 lint/nursery/useSortedClasses FIXABLE ━━━
17 │
18 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
14 14 │
@@ -265,6 +280,8 @@ codeOptionsUnsorted.jsx:17:13 lint/nursery/useSortedClasses FIXABLE ━━━
18 │
19 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
15 15 │
@@ -289,6 +306,8 @@ codeOptionsUnsorted.jsx:18:13 lint/nursery/useSortedClasses FIXABLE ━━━
19 │
20 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
16 16 │
@@ -313,6 +332,8 @@ codeOptionsUnsorted.jsx:19:13 lint/nursery/useSortedClasses FIXABLE ━━━
20 │
21 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
17 17 │
@@ -337,6 +358,8 @@ codeOptionsUnsorted.jsx:20:13 lint/nursery/useSortedClasses FIXABLE ━━━
21 │
22 │ >;
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
18 18 │
@@ -361,6 +384,8 @@ codeOptionsUnsorted.jsx:21:13 lint/nursery/useSortedClasses FIXABLE ━━━
22 │ >;
23 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
19 19 │
@@ -385,6 +410,8 @@ codeOptionsUnsorted.jsx:26:6 lint/nursery/useSortedClasses FIXABLE ━━━
27 │ tw`px-2 foo p-4 bar`;
28 │ tw.div`px-2 foo p-4 bar`;
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
24 24 │ // functions
@@ -409,6 +436,8 @@ codeOptionsUnsorted.jsx:27:4 lint/nursery/useSortedClasses FIXABLE ━━━
28 │ tw.div`px-2 foo p-4 bar`;
29 │ notClassFunction("px-2 foo p-4 bar");
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
25 25 │ /* SHOULD emit diagnostics (functions specified in options) */
@@ -433,6 +462,8 @@ codeOptionsUnsorted.jsx:35:13 lint/nursery/useSortedClasses FIXABLE ━━━
36 │ ;
37 │ ;
@@ -625,6 +670,8 @@ codeOptionsUnsorted.jsx:48:2 lint/nursery/useSortedClasses FIXABLE ━━━
49 │ "px-2 foo p-4 bar",
50 │ { "px-2 foo p-4 bar": "px-2 foo p-4 bar", custom: ["px-2 foo p-4 bar"] },
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
46 46 │ clsx(["px-2 foo p-4 bar"]);
@@ -649,6 +696,8 @@ codeOptionsUnsorted.jsx:49:3 lint/nursery/useSortedClasses FIXABLE ━━━
50 │ { "px-2 foo p-4 bar": "px-2 foo p-4 bar", custom: ["px-2 foo p-4 bar"] },
51 │ ],
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
47 47 │ clsx({
@@ -673,6 +722,8 @@ codeOptionsUnsorted.jsx:50:5 lint/nursery/useSortedClasses FIXABLE ━━━
51 │ ],
52 │ });
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
48 48 │ "px-2 foo p-4 bar": [
@@ -697,6 +748,8 @@ codeOptionsUnsorted.jsx:50:25 lint/nursery/useSortedClasses FIXABLE ━━━
51 │ ],
52 │ });
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
48 48 │ "px-2 foo p-4 bar": [
@@ -721,6 +774,8 @@ codeOptionsUnsorted.jsx:50:54 lint/nursery/useSortedClasses FIXABLE ━━━
51 │ ],
52 │ });
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
48 48 │ "px-2 foo p-4 bar": [
diff --git a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_3394.jsx.snap b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_3394.jsx.snap
index 8982804c4403..8cdc29409e98 100644
--- a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_3394.jsx.snap
+++ b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_3394.jsx.snap
@@ -1,7 +1,6 @@
---
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: issue_3394.jsx
-snapshot_kind: text
---
# Input
```jsx
@@ -23,6 +22,8 @@ issue_3394.jsx:3:31 lint/nursery/useSortedClasses FIXABLE ━━━━━━
│ ^^^^
4 │ >
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
1 1 │ <>
diff --git a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_4855.jsx.snap b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_4855.jsx.snap
index 11749509d724..04d8b525443a 100644
--- a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_4855.jsx.snap
+++ b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_4855.jsx.snap
@@ -20,6 +20,8 @@ issue_4855.jsx:1:12 lint/nursery/useSortedClasses FIXABLE ━━━━━━
2 │ Hello
;
3 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
1 │ - Hello
;
@@ -40,6 +42,8 @@ issue_4855.jsx:2:12 lint/nursery/useSortedClasses FIXABLE ━━━━━━
│ ^^^^^^^^^^^^^^^^
3 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
1 1 │ Hello
;
diff --git a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_5601.jsx.snap b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_5601.jsx.snap
index 4e8c57a84542..0d5dc60503ed 100644
--- a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_5601.jsx.snap
+++ b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/issue_5601.jsx.snap
@@ -37,6 +37,8 @@ issue_5601.jsx:11:12 lint/nursery/useSortedClasses FIXABLE ━━━━━━
12 │
13 │ {
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
9 9 │ - with double quotes outside and single quotes inside */
@@ -60,6 +62,8 @@ issue_5601.jsx:17:12 lint/nursery/useSortedClasses FIXABLE ━━━━━━
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
15 15 │ - with single quotes outside and double quotes inside */
diff --git a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/quoteStyleInFunction.jsx.snap b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/quoteStyleInFunction.jsx.snap
index d125432d0c8a..976bb4d0e631 100644
--- a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/quoteStyleInFunction.jsx.snap
+++ b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/quoteStyleInFunction.jsx.snap
@@ -30,6 +30,8 @@ quoteStyleInFunction.jsx:2:4 lint/nursery/useSortedClasses FIXABLE ━━━
3 │ tw({ base: "content-[''] absolute" });
4 │ tw({ variant: { dark: "content-[''] absolute", light: "flex gap-2 p-4 m-2 [&_svg:not([class*='size-'])]:w-4 items-center" } });
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
1 1 │ // functions
@@ -53,6 +55,8 @@ quoteStyleInFunction.jsx:3:12 lint/nursery/useSortedClasses FIXABLE ━━━
4 │ tw({ variant: { dark: "content-[''] absolute", light: "flex gap-2 p-4 m-2 [&_svg:not([class*='size-'])]:w-4 items-center" } });
5 │ tw('flex gap-2 p-4 m-2 [&_svg:not([class*="size-"])]:w-4 items-center');
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
1 1 │ // functions
@@ -77,6 +81,8 @@ quoteStyleInFunction.jsx:4:23 lint/nursery/useSortedClasses FIXABLE ━━━
5 │ tw('flex gap-2 p-4 m-2 [&_svg:not([class*="size-"])]:w-4 items-center');
6 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
2 2 │ tw("content-[''] absolute");
@@ -101,6 +107,8 @@ quoteStyleInFunction.jsx:4:55 lint/nursery/useSortedClasses FIXABLE ━━━
5 │ tw('flex gap-2 p-4 m-2 [&_svg:not([class*="size-"])]:w-4 items-center');
6 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
2 2 │ tw("content-[''] absolute");
@@ -125,6 +133,8 @@ quoteStyleInFunction.jsx:5:4 lint/nursery/useSortedClasses FIXABLE ━━━
6 │
7 │ // function in jsx attribute
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
3 3 │ tw({ base: "content-[''] absolute" });
@@ -148,6 +158,8 @@ quoteStyleInFunction.jsx:8:16 lint/nursery/useSortedClasses FIXABLE ━━━
9 │ Hello
;
10 │ Hello
;
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
6 6 │
@@ -172,6 +184,8 @@ quoteStyleInFunction.jsx:9:24 lint/nursery/useSortedClasses FIXABLE ━━━
10 │ Hello
;
11 │ ;
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
7 7 │ // function in jsx attribute
@@ -196,6 +210,8 @@ quoteStyleInFunction.jsx:10:35 lint/nursery/useSortedClasses FIXABLE ━━━
11 │ ;
12 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
8 8 │ Hello
;
@@ -220,6 +236,8 @@ quoteStyleInFunction.jsx:10:67 lint/nursery/useSortedClasses FIXABLE ━━━
11 │ ;
12 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
8 8 │ Hello
;
@@ -243,6 +261,8 @@ quoteStyleInFunction.jsx:11:16 lint/nursery/useSortedClasses FIXABLE ━━━
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
9 9 │ Hello
;
diff --git a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/sorted.jsx.snap b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/sorted.jsx.snap
index c22ed9999e70..f77bbfe20852 100644
--- a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/sorted.jsx.snap
+++ b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/sorted.jsx.snap
@@ -1,7 +1,6 @@
---
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: sorted.jsx
-snapshot_kind: text
---
# Input
```jsx
@@ -77,6 +76,8 @@ sorted.jsx:25:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
26 │
27 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
23 23 │
diff --git a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/templateLiteralSpace.jsx.snap b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/templateLiteralSpace.jsx.snap
index bb1972e9ab7a..e639a1386834 100644
--- a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/templateLiteralSpace.jsx.snap
+++ b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/templateLiteralSpace.jsx.snap
@@ -1,7 +1,6 @@
---
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: templateLiteralSpace.jsx
-snapshot_kind: text
---
# Input
```jsx
@@ -27,6 +26,8 @@ templateLiteralSpace.jsx:2:26 lint/nursery/useSortedClasses FIXABLE ━━━
3 │
4 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
1 1 │ <>
@@ -50,6 +51,8 @@ templateLiteralSpace.jsx:3:15 lint/nursery/useSortedClasses FIXABLE ━━━
4 │
5 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
1 1 │ <>
@@ -74,6 +77,8 @@ templateLiteralSpace.jsx:4:30 lint/nursery/useSortedClasses FIXABLE ━━━
5 │
6 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
2 2 │
@@ -98,6 +103,8 @@ templateLiteralSpace.jsx:5:15 lint/nursery/useSortedClasses FIXABLE ━━━
6 │
7 │ >
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
3 3 │
@@ -122,6 +129,8 @@ templateLiteralSpace.jsx:6:30 lint/nursery/useSortedClasses FIXABLE ━━━
7 │ >
8 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
4 4 │
@@ -146,6 +155,8 @@ templateLiteralSpace.jsx:6:55 lint/nursery/useSortedClasses FIXABLE ━━━
7 │ >
8 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
4 4 │
diff --git a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/unsorted.jsx.snap b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/unsorted.jsx.snap
index addc21bf860f..0d3784ef373c 100644
--- a/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/unsorted.jsx.snap
+++ b/crates/biome_js_analyze/tests/specs/nursery/useSortedClasses/unsorted.jsx.snap
@@ -94,6 +94,8 @@ unsorted.jsx:4:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
5 │
6 │ {/* SHOULD NOT emit diagnostics (custom attributes not specified in options) */}
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
2 2 │ {/* attributes */}
@@ -118,6 +120,8 @@ unsorted.jsx:5:17 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
6 │ {/* SHOULD NOT emit diagnostics (custom attributes not specified in options) */}
7 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
3 3 │ {/* SHOULD emit diagnostics (class/className attributes supported by default) */}
@@ -142,6 +146,8 @@ unsorted.jsx:11:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
12 │
13 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
9 9 │ {/* utility sorting */}
@@ -166,6 +172,8 @@ unsorted.jsx:12:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
13 │
14 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
10 10 │ {/* SHOULD emit diagnostics (class attribute supported by default) */}
@@ -190,6 +198,8 @@ unsorted.jsx:13:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
14 │
15 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
11 11 │
@@ -214,6 +224,8 @@ unsorted.jsx:14:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
15 │
16 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
12 12 │
@@ -238,6 +250,8 @@ unsorted.jsx:15:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
16 │
17 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
13 13 │
@@ -262,6 +276,8 @@ unsorted.jsx:16:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
17 │
18 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
14 14 │
@@ -286,6 +302,8 @@ unsorted.jsx:17:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
18 │
19 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
15 15 │
@@ -310,6 +328,8 @@ unsorted.jsx:18:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
19 │
20 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
16 16 │
@@ -334,6 +354,8 @@ unsorted.jsx:19:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
20 │
21 │ {/* variant sorting */}
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
17 17 │
@@ -358,6 +380,8 @@ unsorted.jsx:20:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
21 │ {/* variant sorting */}
22 │ {/* SHOULD emit diagnostics (arbitrary variants not supported yet) */}
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
18 18 │
@@ -382,6 +406,8 @@ unsorted.jsx:23:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
24 │
25 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
21 21 │ {/* variant sorting */}
@@ -406,6 +432,8 @@ unsorted.jsx:24:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
25 │
26 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
22 22 │ {/* SHOULD emit diagnostics (arbitrary variants not supported yet) */}
@@ -430,6 +458,8 @@ unsorted.jsx:25:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
26 │
27 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
23 23 │
@@ -454,6 +484,8 @@ unsorted.jsx:26:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
27 │
28 │ {/* TODO: arbitrary variant */}
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
24 24 │
@@ -478,6 +510,8 @@ unsorted.jsx:27:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
28 │ {/* TODO: arbitrary variant */}
29 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
25 25 │
@@ -502,6 +536,8 @@ unsorted.jsx:29:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
30 │
31 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
27 27 │
@@ -526,6 +562,8 @@ unsorted.jsx:30:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
31 │
32 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
28 28 │ {/* TODO: arbitrary variant */}
@@ -550,6 +588,8 @@ unsorted.jsx:31:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
32 │
33 │ {/* negative value utilities */}
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
29 29 │
@@ -574,6 +614,8 @@ unsorted.jsx:32:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
33 │ {/* negative value utilities */}
34 │ {/* SHOULD emit diagnostics (negative values like -ml-2 should be detected) */}
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
30 30 │
@@ -598,6 +640,8 @@ unsorted.jsx:35:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
36 │
37 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
33 33 │ {/* negative value utilities */}
@@ -622,6 +666,8 @@ unsorted.jsx:36:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
37 │
38 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
34 34 │ {/* SHOULD emit diagnostics (negative values like -ml-2 should be detected) */}
@@ -646,6 +692,8 @@ unsorted.jsx:37:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
38 │
39 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
35 35 │
@@ -670,6 +718,8 @@ unsorted.jsx:38:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
39 │
40 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
36 36 │
@@ -694,6 +744,8 @@ unsorted.jsx:39:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
40 │
41 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
37 37 │
@@ -718,6 +770,8 @@ unsorted.jsx:40:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
41 │
42 │ >;
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
38 38 │
@@ -742,6 +796,8 @@ unsorted.jsx:41:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
42 │ >;
43 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
39 39 │
@@ -766,6 +822,8 @@ unsorted.jsx:55:13 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
56 │ ;
57 │ ;
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
53 53 │ // nested values
@@ -790,6 +848,8 @@ unsorted.jsx:56:14 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
57 │ ;
58 │ ;
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
54 54 │ /* SHOULD emit diagnostics (class attribute supported by default) */
@@ -814,6 +874,8 @@ unsorted.jsx:57:14 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
58 │ ;
59 │ ;
@@ -838,6 +900,8 @@ unsorted.jsx:58:15 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
59 │ ;
@@ -862,6 +926,8 @@ unsorted.jsx:61:3 lint/nursery/useSortedClasses FIXABLE ━━━━━━━
62 │ "px-2 foo p-4 bar",
63 │ { "px-2 foo p-4 bar": "px-2 foo p-4 bar", custom: ["px-2 foo p-4 bar"] },
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
59 59 │ hello world··
5 │
hello world
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
1 1 │ <>
@@ -58,6 +60,8 @@ whitespace.jsx:4:16 lint/nursery/useSortedClasses FIXABLE ━━━━━━
5 │
hello world
6 │
empty with spaces
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
2 2 │ {/* Test cases for whitespace handling */}
@@ -82,6 +86,8 @@ whitespace.jsx:5:16 lint/nursery/useSortedClasses FIXABLE ━━━━━━
6 │
empty with spaces
7 │
empty without spaces
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
3 3 │
hello world
@@ -106,6 +112,8 @@ whitespace.jsx:8:16 lint/nursery/useSortedClasses FIXABLE ━━━━━━
9 │
spaces everywhere
10 │
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
6 6 │
empty with spaces
@@ -130,6 +138,8 @@ whitespace.jsx:9:16 lint/nursery/useSortedClasses FIXABLE ━━━━━━
10 │
11 │ {/* Template literal cases */}
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
7 7 │
empty without spaces
@@ -153,6 +163,8 @@ whitespace.jsx:12:18 lint/nursery/useSortedClasses FIXABLE ━━━━━━
13 │
template literal leading
14 │
template literal both
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
10 10 │
@@ -177,6 +189,8 @@ whitespace.jsx:13:18 lint/nursery/useSortedClasses FIXABLE ━━━━━━
14 │
template literal both
15 │ >
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
11 11 │ {/* Template literal cases */}
@@ -200,6 +214,8 @@ whitespace.jsx:14:18 lint/nursery/useSortedClasses FIXABLE ━━━━━━
│ ^^^^^^^^^^^^^^^^^^^^^^
15 │ >
+ i This rule is still being actively worked on, so it may be missing features or have rough edges. Visit https://github.com/biomejs/biome/issues/1274 for more information or to report possible bugs.
+
i Unsafe fix: Sort the classes.
12 12 │
template literal trailing
diff --git a/xtask/rules_check/src/lib.rs b/xtask/rules_check/src/lib.rs
index dcdbb18da5ea..5ef7979282dc 100644
--- a/xtask/rules_check/src/lib.rs
+++ b/xtask/rules_check/src/lib.rs
@@ -69,6 +69,15 @@ pub fn check_rules() -> anyhow::Result<()> {
let group = R::Group::NAME;
let rule_name = R::METADATA.name;
let rule_severity = R::METADATA.severity;
+
+ if let Some(issue_number) = R::METADATA.issue_number
+ && group != "nursery"
+ {
+ self.errors.push(Errors::new(format!(
+ "The rule '{rule_name}' has an issue number set to '{issue_number}'. The presence of an issue number indicates that the rule is not yet completed. Rules that have an issue number must belong to the 'nursery' group. Change the group of the rule to 'nursery' or remove the issue number."
+ )));
+ }
+
if matches!(group, "a11y" | "correctness" | "security")
&& rule_severity != Severity::Error
&& !matches!(