{"record":{"id":"2b2e89e90281285a","repo":"oxc-project/oxc","slug":"unused-directive-no-problems-were-reported-fro","errorCode":null,"errorMessage":"Unused {} directive (no problems were reported from {rule_name}).","messagePattern":"Unused (.+?) directive \\(no problems were reported from (.+?)\\)\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/disable_directives.rs","lineNumber":1387,"sourceCode":"\n    // Report unused disable comments\n    let unused_disable = directives.collect_unused_disable_comments();\n    for unused_comment in unused_disable {\n        let span = unused_comment.span;\n        match unused_comment.r#type {\n            RuleCommentType::All => {\n                diagnostics.push(\n                    OxcDiagnostic::warn(unused_comment.directive_prefix.unused_disable_message())\n                        .with_label(span)\n                        .with_severity(severity),\n                );\n            }\n            RuleCommentType::Single(rules) => {\n                for rule in rules {\n                    let rule_message =\n                        rule.directive_prefix.unused_disable_rule_message(&rule.rule_name);\n                    diagnostics.push(\n                        OxcDiagnostic::warn(rule_message)\n                            .with_label(rule.name_span)\n                            .with_severity(severity),\n                    );\n                }\n            }\n        }\n    }\n\n    // Report unused enable comments\n    let unused_enable = directives.unused_enable_comments();\n    for (directive_prefix, rule_name, span) in unused_enable {\n        let message = if let Some(rule_name) = rule_name {\n            directive_prefix.unused_enable_rule_message(rule_name)\n        } else {\n            directive_prefix.unused_enable_message()\n        };\n        diagnostics.push(OxcDiagnostic::warn(message).with_label(*span).with_severity(severity));\n    }","sourceCodeStart":1369,"sourceCodeEnd":1405,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/disable_directives.rs#L1369-L1405","documentation":"Diagnostic from create_unused_directives_diagnostics: a disable comment naming a specific rule produced no matching diagnostic in its span. The rule never fired (or was fixed), so the per-rule suppression is unused and may mask future regressions from that rule.","triggerScenarios":"Thrown at crates/oxc_linter/src/disable_directives.rs:1387 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the stale rule-specific disable comment","Re-run the linter after fixing the underlying issue so only needed disables remain","Turn off reportUnusedDisableDirectives if stale comments are acceptable"],"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"}