From fb878061100fbf66749948402bb675141dd7d141 Mon Sep 17 00:00:00 2001 From: connorshea <2977353+connorshea@users.noreply.github.com> Date: Fri, 13 Feb 2026 00:48:54 +0000 Subject: [PATCH] docs(linter): Ensure that we do not auto-format the docs for `unicorn/number-literal-case` rule. (#19346) The examples make no sense if we run oxfmt/prettier on them, so we need to disable the formatting explicitly here. Fixes https://github.com/oxc-project/website/issues/896. --- crates/oxc_linter/src/rules/unicorn/number_literal_case.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/oxc_linter/src/rules/unicorn/number_literal_case.rs b/crates/oxc_linter/src/rules/unicorn/number_literal_case.rs index 31843bd72a045..0be3cdc0bf4ea 100644 --- a/crates/oxc_linter/src/rules/unicorn/number_literal_case.rs +++ b/crates/oxc_linter/src/rules/unicorn/number_literal_case.rs @@ -44,11 +44,14 @@ declare_oxc_lint!( /// /// ### Why is this bad? /// - /// When both an identifier and a number literal are in lower case, it can be hard to differentiate between them. + /// When both an identifier and a numeric literal are in + /// lower case, it can be hard to differentiate between them. /// /// ### Examples /// /// Examples of **incorrect** code for this rule: + /// + /// /// ```javascript /// const foo = 0XFF; /// const foo = 0xff; @@ -72,6 +75,7 @@ declare_oxc_lint!( /// const foo = 0xFFn; /// const foo = 2e+5; /// ``` + /// NumberLiteralCase, unicorn, style,