{"record":{"id":"1762be1d95938bd5","repo":"oxc-project/oxc","slug":"specifier-name-not-found-in-imported-namespace","errorCode":null,"errorMessage":"{specifier_name:?} not found in imported namespace {namespace_name:?}.","messagePattern":"(.+?) not found in imported namespace (.+?)\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/import/namespace.rs","lineNumber":21,"sourceCode":"use oxc_ast::{\n    AstKind,\n    ast::{BindingPattern, ObjectPattern},\n};\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_semantic::AstNode;\nuse oxc_span::{GetSpan, Span};\nuse schemars::JsonSchema;\nuse serde::Deserialize;\n\nuse crate::{\n    context::LintContext,\n    module_record::{ExportExportName, ExportImportName, ImportImportName, ModuleRecord},\n    rule::{DefaultRuleConfig, Rule},\n};\n\nfn no_export(span: Span, specifier_name: &str, namespace_name: &str) -> OxcDiagnostic {\n    OxcDiagnostic::warn(format!(\n        \"{specifier_name:?} not found in imported namespace {namespace_name:?}.\"\n    ))\n    .with_label(span)\n}\n\nfn no_export_in_deeply_imported_namespace(\n    span: Span,\n    specifier_name: &str,\n    namespace_name: &str,\n) -> OxcDiagnostic {\n    OxcDiagnostic::warn(format!(\n        \"{specifier_name:?} not found in deeply imported namespace {namespace_name:?}.\"\n    ))\n    .with_label(span)\n}\n\nfn computed_reference(span: Span, namespace_name: &str) -> OxcDiagnostic {\n    OxcDiagnostic::warn(format!(","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/import/namespace.rs#L3-L39","documentation":"Fires from import/namespace when a property access on an imported namespace object (e.g. ns.foo) references a name the source module does not export. The no_export helper builds the message with the specifier and namespace names; it is reached from direct member accesses and from destructuring object patterns.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/import/namespace.rs:21 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the property name to one the source module exports","Add the export to the source module","Destructure only names that actually exist in the namespace"],"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"}