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:
camc314 2024-09-01 06:23:25 +00:00
parent 8d781e7dff
commit 2499cb9785

View file

@ -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;
/// ```