oxc-project/oxc · error · OxcDiagnostic
Missing JSDoc `@param` description.
Error message
Missing JSDoc `@param` description.
What it means
Fires from jsdoc/require-param-description when a @param tag exists but has no description text after its name/type. The missing_type_diagnostic helper (name is historical) labels the tag span and advises adding the description.
Source
Thrown at crates/oxc_linter/src/rules/jsdoc/require_param_description.rs:21
use oxc_ast::AstKind;
use oxc_diagnostics::OxcDiagnostic;
use oxc_macros::declare_oxc_lint;
use oxc_span::Span;
use oxc_str::CompactStr;
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`.View on GitHub (pinned to e1e7af627c)
Solutions
- Add a description after the `@param {type} name` portion of the tag
- If descriptions are unnecessary, disable this rule
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/oxc_linter/src/rules/jsdoc/require_param_description.rs:21 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/c2bb5ce621b0eb9d.
Report an issue: GitHub.