Skip to content

Commit

Permalink
refactor(linter/oxc): update rule docs for erasing-op (#5376)
Browse files Browse the repository at this point in the history
  • Loading branch information
camc314 committed Sep 1, 2024
1 parent 8d781e7 commit 2499cb9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/oxc_linter/src/rules/oxc/erasing_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ declare_oxc_lint!(
/// The whole expression can be replaced by zero. This is most likely not the intended outcome and should probably be corrected.
///
/// ### Example
///
/// Examples of **incorrect** code for this rule:
/// ```javascript
/// // Bad
/// let x = 1;
/// let y = x * 0;
/// ```
///
/// // Good
/// Examples of **correct** code for this rule:
/// ```javascript
/// let x = 1;
/// let y = 0;
/// ```
Expand Down

0 comments on commit 2499cb9

Please sign in to comment.