{"record":{"id":"c1dc2060404ee0dd","repo":"oxc-project/oxc","slug":"no-root-defined-for-property-path","errorCode":null,"errorMessage":"No root defined for `@property` path.","messagePattern":"No root defined for `@property` path\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/jsdoc/check_property_names.rs","lineNumber":13,"sourceCode":"use oxc_diagnostics::{LabeledSpan, OxcDiagnostic};\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\nuse rustc_hash::{FxHashMap, FxHashSet};\n\nuse crate::{\n    context::LintContext,\n    rule::Rule,\n    utils::{should_ignore_as_internal, should_ignore_as_private},\n};\n\nfn no_root(span: Span, x1: &str) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"No root defined for `@property` path.\")\n        .with_help(format!(\"`@property` path declaration `{x1}` appears before any real property.\"))\n        .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct CheckPropertyNames;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots.\n    ///\n    /// ### Why is this bad?\n    ///\n    /// `@property` tags with the same name can be confusing and may indicate a mistake.\n    ///\n    /// ### Examples\n    ///","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/jsdoc/check_property_names.rs#L1-L31","documentation":"Fires from jsdoc/check-property-names when a @property path references a parent name (e.g. 'foo.bar' where the path before the dot, or its '[]' stripped form) that has not been declared by any earlier @property in the block. The no_root helper labels the span and names the orphan path in the help text.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/jsdoc/check_property_names.rs:13 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Declare the root property with its own @property tag before nested paths","Fix the parent name in the path so it matches a declared property"],"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"}