From 2499cb9785320707b322f1085f267f48bde2b48b Mon Sep 17 00:00:00 2001 From: camc314 <18101008+camc314@users.noreply.github.com> Date: Sun, 1 Sep 2024 06:23:25 +0000 Subject: [PATCH] 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 --- crates/oxc_linter/src/rules/oxc/erasing_op.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/oxc_linter/src/rules/oxc/erasing_op.rs b/crates/oxc_linter/src/rules/oxc/erasing_op.rs index 3a2d6864f..34f35929d 100644 --- a/crates/oxc_linter/src/rules/oxc/erasing_op.rs +++ b/crates/oxc_linter/src/rules/oxc/erasing_op.rs @@ -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; /// ```