Skip to content

Commit 2499cb9

Browse files
committedSep 1, 2024·
refactor(linter/oxc): update rule docs for erasing-op (#5376)
updates the rule docs to align with the template: https://github.com/oxc-project/oxc/blob/a266b4516784eb03e4610b5dc55d0248dc9f554c/tasks/rulegen/template.txt#L13
1 parent 8d781e7 commit 2499cb9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎crates/oxc_linter/src/rules/oxc/erasing_op.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,16 @@ declare_oxc_lint!(
3131
/// The whole expression can be replaced by zero. This is most likely not the intended outcome and should probably be corrected.
3232
///
3333
/// ### Example
34+
///
35+
/// Examples of **incorrect** code for this rule:
3436
/// ```javascript
3537
/// // Bad
3638
/// let x = 1;
3739
/// let y = x * 0;
40+
/// ```
3841
///
39-
/// // Good
42+
/// Examples of **correct** code for this rule:
43+
/// ```javascript
4044
/// let x = 1;
4145
/// let y = 0;
4246
/// ```

0 commit comments

Comments
 (0)
Please sign in to comment.