Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/modern-eggs-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@biomejs/biome": patch
---

Improved the diagnostics of nursery rules. Added a message to diagnostics emitted by nursery rules, so that users are aware of nature of nursery rules.
9 changes: 7 additions & 2 deletions crates/biome_analyze/src/signals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,13 @@ where
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 "<Hyperlink href={url.as_str()}>{url.as_str()}</Hyperlink>" for more information or to report possible bugs."
});
"This rule is still being actively worked on, so it may be missing features or have rough edges. Visit "<Hyperlink href={url.as_str()}>{url.as_str()}</Hyperlink>" for more information or to report possible bugs."
});
}
if <R::Group as RuleGroup>::NAME == "nursery" {
diagnostic = diagnostic.note(markup! {
"This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit "<Hyperlink href="https://biomejs.dev/linter/#nursery">"https://biomejs.dev/linter/#nursery"</Hyperlink>" for more information."
});
}
AnalyzerDiagnostic::from(diagnostic)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ src/index.ts:5:1 lint/nursery/noFloatingPromises ━━━━━━━━━━

i This happens when a Promise is not awaited, lacks a `.catch` or `.then` rejection handler, or is not explicitly ignored using the `void` operator.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ src/index.ts:5:1 lint/nursery/noFloatingPromises ━━━━━━━━━━

i This happens when a Promise is not awaited, lacks a `.catch` or `.then` rejection handler, or is not explicitly ignored using the `void` operator.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ comment.css:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━

i Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ empty.css:1:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━

i Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ comment.graphql:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━

i Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ empty.graphql:1:1 lint/nursery/noEmptySource ━━━━━━━━━━━

i Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ invalid.graphql:2:2 lint/nursery/useConsistentGraphqlDescriptions ━━━━

i To stay consistent within the project, write the description block style.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -46,6 +48,8 @@ invalid.graphql:4:2 lint/nursery/useConsistentGraphqlDescriptions ━━━━

i To stay consistent within the project, write the description block style.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -63,5 +67,7 @@ invalid.graphql:6:2 lint/nursery/useConsistentGraphqlDescriptions ━━━━

i To stay consistent within the project, write the description block style.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ invalid.graphql:2:2 lint/nursery/useConsistentGraphqlDescriptions ━━━━

i To stay consistent within the project, write the description inline style.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -58,6 +60,8 @@ invalid.graphql:6:2 lint/nursery/useConsistentGraphqlDescriptions ━━━━

i To stay consistent within the project, write the description inline style.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -78,5 +82,7 @@ invalid.graphql:10:2 lint/nursery/useConsistentGraphqlDescriptions ━━━━

i To stay consistent within the project, write the description inline style.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ invalid.graphql:2:10 lint/nursery/useDeprecatedDate ━━━━━━━━━

i Add a `deletionDate` argument to the directive.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -54,6 +56,8 @@ invalid.graphql:8:10 lint/nursery/useDeprecatedDate ━━━━━━━━━

i The argument must match the `YYYY-MM-DD` format.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -70,5 +74,7 @@ invalid.graphql:14:10 lint/nursery/useDeprecatedDate ━━━━━━━━━

i Remove deprecated code or move deprecation date to the future.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ invalid.graphql:7:1 lint/nursery/useUniqueGraphqlOperationName ━━━━━

i Rename the operation to have a unique name.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -82,6 +84,8 @@ invalid.graphql:19:1 lint/nursery/useUniqueGraphqlOperationName ━━━━━

i Rename the operation to have a unique name.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -105,5 +109,7 @@ invalid.graphql:25:1 lint/nursery/useUniqueGraphqlOperationName ━━━━━

i Rename the operation to have a unique name.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ invalid.html:3:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -88,6 +90,8 @@ invalid.html:5:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -105,6 +109,8 @@ invalid.html:7:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -122,6 +128,8 @@ invalid.html:9:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -139,6 +147,8 @@ invalid.html:11:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -156,6 +166,8 @@ invalid.html:13:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -173,6 +185,8 @@ invalid.html:15:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -190,6 +204,8 @@ invalid.html:17:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -207,6 +223,8 @@ invalid.html:19:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -224,6 +242,8 @@ invalid.html:21:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -241,6 +261,8 @@ invalid.html:23:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -258,6 +280,8 @@ invalid.html:25:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -275,6 +299,8 @@ invalid.html:27:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -292,6 +318,8 @@ invalid.html:29:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -309,6 +337,8 @@ invalid.html:31:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -326,6 +356,8 @@ invalid.html:33:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -343,6 +375,8 @@ invalid.html:35:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -360,6 +394,8 @@ invalid.html:37:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -377,6 +413,8 @@ invalid.html:39:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -394,6 +432,8 @@ invalid.html:41:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -411,6 +451,8 @@ invalid.html:43:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -428,6 +470,8 @@ invalid.html:45:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -445,6 +489,8 @@ invalid.html:47:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```

Expand All @@ -461,5 +507,7 @@ invalid.html:49:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ invalid.html:2:1 lint/nursery/noAmbiguousAnchorText ━━━━━━━━━

i Ambiguous anchor descriptions do not provide sufficient context for screen reader users. Provide more context to these users.

i This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.


```
Loading