mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
refactor(linter/oxc): update rule docs for erasing-op (#5376)
updates the rule docs to align with the template:
a266b45167/tasks/rulegen/template.txt (L13)
This commit is contained in:
parent
8d781e7dff
commit
2499cb9785
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
/// ```
|
||||
|
|
|
|||
Loading…
Reference in a new issue