From db6afb922f6cb5beada963af6baa90eb6d8bd632 Mon Sep 17 00:00:00 2001 From: camc314 <18101008+camc314@users.noreply.github.com> Date: Wed, 14 May 2025 13:42:57 +0000 Subject: [PATCH] docs(linter): improve docs of no-debugger (#11033) --- crates/oxc_linter/src/rules/eslint/no_debugger.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/crates/oxc_linter/src/rules/eslint/no_debugger.rs b/crates/oxc_linter/src/rules/eslint/no_debugger.rs index cd5b286c83a5f..1a035b1cdffb8 100644 --- a/crates/oxc_linter/src/rules/eslint/no_debugger.rs +++ b/crates/oxc_linter/src/rules/eslint/no_debugger.rs @@ -24,6 +24,8 @@ declare_oxc_lint!( /// /// ### Example /// + /// Examples of **incorrect** code for this rule: + /// /// ```javascript /// async function main() { /// const data = await getData(); @@ -31,6 +33,15 @@ declare_oxc_lint!( /// debugger; /// } /// ``` + /// + /// Examples of **correct** code for this rule: + /// ```javascript + /// async function main() { + /// const data = await getData(); + /// const result = complexCalculation(data); + /// } + /// ``` + /// NoDebugger, eslint, correctness,