Skip to content

Commit

Permalink
fix(docs): incorrect snippets (#3059)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jun 4, 2024
1 parent 378c05e commit 6cff2f3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 1 addition & 3 deletions crates/biome_css_analyze/src/lint/nursery/no_empty_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ declare_rule! {
/// ```
///
/// ```css
/// p {
/// /* foo */
/// }
/// p { /* foo */ }
/// ```
///
/// ```css
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ declare_rule! {
/// bar_interface(): void;
/// foo_interface(sn: string | number): void;
/// }
/// ``
/// ```
///
/// ```js,expect_diagnostic
/// class A {
Expand All @@ -55,7 +55,7 @@ declare_rule! {
/// export function foo_declare(sn: string | number): void;
/// export function bar_declare(): void;
/// }
/// ````
/// ```
///
/// ```js
/// type Foo = {
Expand Down
6 changes: 5 additions & 1 deletion crates/biome_js_analyze/src/lint/nursery/use_date_now.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,19 @@ declare_rule! {
/// ```js,expect_diagnostic
/// const foo = new Date().getTime();
/// ```
///
/// ```js,expect_diagnostic
/// const foo = new Date().valueOf();
/// ```
/// ```js,expect_diagnostic
///
/// ```js,expect_diagnostic,ignore
/// const foo = +new Date;
/// ```
///
/// ```js,expect_diagnostic
/// const foo = Number(new Date());
/// ```
///
/// ```js,expect_diagnostic
/// const foo = new Date() * 2;
/// ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ declare_rule! {
/// ```js,expect_diagnostic
/// import "../.";
/// ```
/// ```js,expect_diagnostic
/// ```js,expect_diagnostic,ignore
/// import("./foo");
/// ```
/// ```js,expect_diagnostic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ declare_rule! {
/// ### Valid
///
/// ```jsx
/// <div>...</div>
/// <header>...</header>
/// <div></div>
/// <header></header>
/// <img alt="" src="image.jpg" />
/// ```
///
Expand Down

0 comments on commit 6cff2f3

Please sign in to comment.