{"record":{"id":"d28d0200945bf9df","repo":"oxc-project/oxc","slug":"unused-directive-no-problems-were-reported","errorCode":null,"errorMessage":"Unused {} directive (no problems were reported).","messagePattern":"Unused (.+?) directive \\(no problems were reported\\)\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/disable_directives.rs","lineNumber":1377,"sourceCode":") -> Vec<oxc_diagnostics::OxcDiagnostic> {\n    use oxc_diagnostics::OxcDiagnostic;\n\n    let mut diagnostics = Vec::new();\n\n    let severity = if severity == crate::AllowWarnDeny::Deny {\n        oxc_diagnostics::Severity::Error\n    } else {\n        oxc_diagnostics::Severity::Warning\n    };\n\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","sourceCodeStart":1359,"sourceCodeEnd":1395,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/disable_directives.rs#L1359-L1395","documentation":"Diagnostic from create_unused_directives_diagnostics (report_unused directives): an oxlint-disable (or eslint-disable) comment with no rule list was collected as unused, meaning no problems were actually reported in the span it covers, so the blanket suppression is dead weight that hides future lint regressions.","triggerScenarios":"Thrown at crates/oxc_linter/src/disable_directives.rs:1377 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the unused disable comment","Narrow the comment to the specific rules that actually fire","If suppression is still needed in CI, disable the reportUnusedDisableDirectives option"],"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"}