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

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
14 changes: 14 additions & 0 deletions crates/biome_analyze/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,20 @@ The documentation needs to adhere to the following rules:
/// ```
````

- **Callout blocks (Asides)**

You can use [Starlight asides](https://starlight.astro.build/guides/authoring-content/#asides) (also known as "admonitions" or "callouts") to highlight important notes, warnings, or tips in your rule documentation.

Example usage:

````rust
/// :::caution
/// The rule doesn't support dependencies installed inside a monorepo.
/// :::
````

Supported types: `:::note`, `:::tip`, `:::caution`, `:::danger`.

- **Ordering of code block properties**

In addition to the language, a code block can be tagged with a few additional properties like `expect_diagnostic`, `options`, `full_options`, `use_options`, `ignore` and/or `file=<path>`.
Expand Down
30 changes: 30 additions & 0 deletions xtask/codegen/src/generate_new_analyzer_rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ use biome_rule_options::{rule_name_snake_case}::{rule_name_upper_camel}Options;
///
/// Try to stay consistent with the descriptions of implemented rules.
///
/// You can use asides to highlight important information:
/// :::note
/// Important information for users.
/// :::
///
/// ## Examples
///
/// ### Invalid
Expand Down Expand Up @@ -169,6 +174,11 @@ use biome_rule_options::{rule_name_snake_case}::{rule_name_upper_camel}Options;
///
/// Add a link to the corresponding stylelint rule (if any):
///
/// You can use asides to highlight important information:
/// :::note
/// Important information for users.
/// :::
///
/// ## Examples
///
/// ### Invalid
Expand Down Expand Up @@ -247,6 +257,11 @@ use biome_rule_options::{rule_name_snake_case}::{rule_name_upper_camel}Options;
///
/// Try to stay consistent with the descriptions of implemented rules.
///
/// You can use asides to highlight important information:
/// :::note
/// Important information for users.
/// :::
///
/// ## Examples
///
/// ### Invalid
Expand Down Expand Up @@ -325,6 +340,11 @@ use biome_rule_options::{rule_name_snake_case}::{rule_name_upper_camel}Options;
///
/// Try to stay consistent with the descriptions of implemented rules.
///
/// You can use asides to highlight important information:
/// :::note
/// Important information for users.
/// :::
///
/// ## Examples
///
/// ### Invalid
Expand Down Expand Up @@ -400,6 +420,11 @@ use biome_rule_options::{rule_name_snake_case}::{rule_name_upper_camel}Options;
///
/// Try to stay consistent with the descriptions of implemented rules.
///
/// You can use asides to highlight important information:
/// :::note
/// Important information for users.
/// :::
///
/// ## Examples
///
/// ### Invalid
Expand Down Expand Up @@ -475,6 +500,11 @@ use biome_rule_options::{rule_name_snake_case}::{rule_name_upper_camel}Options;
///
/// Try to stay consistent with the descriptions of implemented rules.
///
/// You can use asides to highlight important information:
/// :::note
/// Important information for users.
/// :::
///
/// ## Examples
///
/// ### Invalid
Expand Down
Loading