{"record":{"id":"c7fc5778a86b2a2b","repo":"oxc-project/oxc","slug":"missing-root-type-for-param","errorCode":null,"errorMessage":"Missing root type for @param.","messagePattern":"Missing root type for @param\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/jsdoc/require_param_type.rs","lineNumber":27,"sourceCode":"\nuse crate::{\n    AstNode,\n    context::LintContext,\n    rule::{DefaultRuleConfig, Rule},\n    utils::{\n        ParamKind, collect_params, get_function_nearest_jsdoc_node, should_ignore_as_internal,\n        should_ignore_as_private,\n    },\n};\n\nfn missing_type_diagnostic(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Missing JSDoc `@param` type.\")\n        .with_help(\"Add {type} to `@param` tag.\")\n        .with_label(span)\n}\n\nfn missing_root_type_diagnostic(span: Span, default_type: &CompactStr) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Missing root type for @param.\")\n        .with_help(format!(\"Add {{{default_type}}} to `@param` tag.\"))\n        .with_label(span)\n}\n\n#[derive(Debug, Clone, Deserialize, JsonSchema)]\n#[serde(rename_all = \"camelCase\", default, deny_unknown_fields)]\npub struct RequireParamTypeConfig {\n    /// The type string to set by default for destructured roots. Defaults to \"object\".\n    default_destructured_root_type: CompactStr,\n    /// Whether to set a default destructured root type. For example, you may wish to avoid manually having to set the type for a `@param` corresponding to a destructured root object as it is always going to be an object. Uses `defaultDestructuredRootType` for the type string. Defaults to `false`.\n    set_default_destructured_root_type: bool,\n}\n\nimpl Default for RequireParamTypeConfig {\n    fn default() -> Self {\n        Self {\n            default_destructured_root_type: CompactStr::from(\"object\"),\n            set_default_destructured_root_type: false,","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/jsdoc/require_param_type.rs#L9-L45","documentation":"Fires from jsdoc/require-param-type when the root object of a destructured parameter (e.g. `@param props` for `{a, b}`) lacks a type. The helper receives the rule's configured default type string and suggests using it for the root.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/jsdoc/require_param_type.rs:27 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a type to the root `@param`, such as the configured default (commonly `object`)","Type the root as the shape of the destructured object"],"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"}