{"record":{"id":"984e7a5cbe0ace17","repo":"oxc-project/oxc","slug":"expects-the-void-tags-to-be-empty-of-any-content","errorCode":null,"errorMessage":"Expects the void tags to be empty of any content.","messagePattern":"Expects the void tags to be empty of any content\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/jsdoc/empty_tags.rs","lineNumber":13,"sourceCode":"use oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\nuse schemars::JsonSchema;\nuse serde::Deserialize;\n\nuse crate::{\n    context::LintContext,\n    rule::{DefaultRuleConfig, Rule},\n};\n\nfn empty_tags_diagnostic(span: Span, tag_name: &str) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Expects the void tags to be empty of any content.\")\n        .with_help(format!(\"`@{tag_name}` tag should not have body.\"))\n        .with_label(span)\n}\n\n#[derive(Debug, Default, Clone, Deserialize)]\npub struct EmptyTags(Box<EmptyTagsConfig>);\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Expects the following tags to be empty of any content:\n    /// - `@abstract`\n    /// - `@async`\n    /// - `@generator`\n    /// - `@global`\n    /// - `@hideconstructor`\n    /// - `@ignore`\n    /// - `@inner`","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/jsdoc/empty_tags.rs#L1-L31","documentation":"Fires from jsdoc/empty-tags when a tag that must be empty (such as @abstract, @async, @deprecated-style void tags per the rule's list) is given body content. The helper names the offending tag in the help text and labels its span.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/jsdoc/empty_tags.rs:13 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the body content from the void tag","Move the explanatory text into the tag's description position if the tag supports it"],"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"}