{"record":{"id":"fa6dc41d941ae355","repo":"oxc-project/oxc","slug":"unused-directive-no-matching-directives-wer","errorCode":null,"errorMessage":"Unused {} directive (no matching {} directives were found).","messagePattern":"Unused (.+?) directive \\(no matching (.+?) directives were found\\)\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/disable_directives.rs","lineNumber":1404,"sourceCode":"                    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    }\n\n    diagnostics\n}\n\n#[cfg(test)]\nmod tests {\n    use oxc_allocator::Allocator;\n    use oxc_ast::Comment;\n    use oxc_parser::Parser;\n    use oxc_semantic::{Semantic, SemanticBuilder};\n    use oxc_span::{SourceType, Span};\n\n    use crate::disable_directives::{\n        DirectivePrefix, DisabledRule, RuleCommentRule, RuleCommentType,\n    };\n\n    use super::{DisableDirectives, DisableDirectivesBuilder};","sourceCodeStart":1386,"sourceCodeEnd":1422,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/disable_directives.rs#L1386-L1422","documentation":"Diagnostic from create_unused_directives_diagnostics: a bare oxlint-enable/eslint-enable comment had no matching disable directive anywhere in the file, so re-enabling rules that were never disabled is a no-op and signals a mistaken or leftover comment.","triggerScenarios":"Thrown at crates/oxc_linter/src/disable_directives.rs:1404 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the orphaned enable comment","Add the matching disable directive if suppression was intended"],"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"}