{"record":{"id":"b1bc0267bac47b2e","repo":"oxc-project/oxc","slug":"unexpected-multi-string","errorCode":null,"errorMessage":"Unexpected multi string.","messagePattern":"Unexpected multi string\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/eslint/no_multi_str.rs","lineNumber":9,"sourceCode":"use oxc_ast::AstKind;\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\n\nuse crate::{AstNode, context::LintContext, rule::Rule};\n\nfn no_multi_str_diagnostic(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Unexpected multi string.\")\n        .with_help(\"Multiline strings are not allowed. Use template literals or string concatenation instead.\")\n        .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct NoMultiStr;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Disallow multiline strings.\n    ///\n    /// ### Why is this bad?\n    ///\n    /// Some consider this to be a bad practice as it was an undocumented feature of JavaScript\n    /// that was only formalized later.\n    ///\n    /// ### Examples","sourceCodeStart":1,"sourceCodeEnd":27,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/eslint/no_multi_str.rs#L1-L27","documentation":"Lint diagnostic from eslint/no-multi-str: a string literal contains a line continuation (backslash + newline) spanning multiple lines. Multiline string literals hide the line breaks from readers and are invalid in strict-mode-adjacent tooling.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/eslint/no_multi_str.rs:9 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a template literal with real newlines","Use string concatenation or \\n escapes across multiple statements"],"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-14T00:17:10.932Z"}