oxc-project/oxc · error · OxcDiagnostic

Missing root description for @param.

Error message

Missing root description for @param.

What it means

Fires from jsdoc/require-param-description when a root @param exists but its destructured object-root description (the text after the trailing '/'' path component) is missing while nested @param descriptions are present.

Source

Thrown at crates/oxc_linter/src/rules/jsdoc/require_param_description.rs:27

use crate::{
    AstNode,
    context::LintContext,
    rule::{DefaultRuleConfig, Rule},
    utils::{
        ParamKind, collect_params, get_function_nearest_jsdoc_node, should_ignore_as_internal,
        should_ignore_as_private,
    },
};

fn missing_type_diagnostic(span: Span) -> OxcDiagnostic {
    OxcDiagnostic::warn("Missing JSDoc `@param` description.")
        .with_help("Add description to `@param` tag.")
        .with_label(span)
}

fn missing_root_description_diagnostic(span: Span) -> OxcDiagnostic {
    OxcDiagnostic::warn("Missing root description for @param.")
        .with_help("Add root description to `@param`.")
        .with_label(span)
}

#[derive(Debug, Clone, Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase", default, deny_unknown_fields)]
pub struct RequireParamDescriptionConfig {
    /// The description string to set by default for destructured roots. Defaults to "The root object".
    default_destructured_root_description: CompactStr,
    /// Whether to set a default destructured root description.
    /// For example, you may wish to avoid manually having to set the description for a @param corresponding to a destructured root object as it should always be the same type of object.
    /// Uses `defaultDestructuredRootDescription` for the description string. Defaults to `false`.
    set_default_destructured_root_description: bool,
}

impl Default for RequireParamDescriptionConfig {
    fn default() -> Self {
        Self {

View on GitHub (pinned to e1e7af627c)

Solutions

  1. Add a description to the root `@param` of the destructured object
  2. Describe the overall object, not just its nested properties
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/oxc_linter/src/rules/jsdoc/require_param_description.rs:27 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oxc-project/oxc@e1e7af627c (2026-08-20). Data as JSON: /api/errors/f2f8c1ddd49813fa. Report an issue: GitHub.