{"record":{"id":"eb9d11426303e2af","repo":"oxc-project/oxc","slug":"don-t-use-escape-sequence-escape-sequence","errorCode":null,"errorMessage":"Don't use '{escape_sequence}' escape sequence.","messagePattern":"Don't use '(.+?)' escape sequence\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/eslint/no_nonoctal_decimal_escape.rs","lineNumber":15,"sourceCode":"use lazy_regex::{Captures, Lazy, Regex, lazy_regex};\nuse oxc_ast::AstKind;\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\n\nuse crate::{\n    AstNode,\n    context::LintContext,\n    fixer::{RuleFix, RuleFixer},\n    rule::Rule,\n};\n\nfn no_nonoctal_decimal_escape_diagnostic(escape_sequence: &str, span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(format!(\"Don't use '{escape_sequence}' escape sequence.\"))\n        .with_help(\"Use the actual character or a valid escape sequence instead.\")\n        .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct NoNonoctalDecimalEscape;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Disallow `\\8` and `\\9` escape sequences in string literals.\n    ///\n    /// ### Why is this bad?\n    ///\n    /// ECMAScript specification treats `\\8` and `\\9` in string literals as a legacy feature\n    ///\n    /// ### Examples\n    ///","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/eslint/no_nonoctal_decimal_escape.rs#L1-L33","documentation":"Lint diagnostic from eslint/no-nonoctal-decimal-escape: a string or regex contains the \\8 or \\9 escape. These are legacy non-octal decimal escapes whose behavior differs between sloppy and strict modes and between JS engines; the fixer rewrites them.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/eslint/no_nonoctal_decimal_escape.rs:15 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the actual character or \\0 for NUL instead of \\8/\\9","Apply the rule's autofix"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}