{"record":{"id":"6cdfaa684a0468b6","repo":"oxc-project/oxc","slug":"unexpected-oxlint-disable-comment-that-does-not","errorCode":null,"errorMessage":"Unexpected `oxlint-disable` comment that does not specify any rules to disable.","messagePattern":"Unexpected `oxlint-disable` comment that does not specify any rules to disable\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/unicorn/no_abusive_eslint_disable.rs","lineNumber":23,"sourceCode":"use crate::{\n    context::LintContext,\n    disable_directives::{DirectivePrefix, RuleCommentType},\n    rule::Rule,\n};\n\nfn no_abusive_eslint_disable_diagnostic(\n    span: Span,\n    directive_prefix: DirectivePrefix,\n) -> OxcDiagnostic {\n    let message = match directive_prefix {\n        DirectivePrefix::Eslint => {\n            \"Unexpected `eslint-disable` comment that does not specify any rules to disable.\"\n        }\n        DirectivePrefix::Oxlint => {\n            \"Unexpected `oxlint-disable` comment that does not specify any rules to disable.\"\n        }\n    };\n    OxcDiagnostic::warn(message)\n        .with_help(\"Specify the rules you want to disable.\")\n        .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct NoAbusiveEslintDisable;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Disallows `oxlint-disable` or `eslint-disable` comments without specifying rules.\n    ///\n    /// ### Why is this bad?\n    ///\n    /// A general `oxlint-disable` or `eslint-disable` comment suppresses all lint errors, not just the intended one,\n    /// potentially hiding useful warnings and making debugging harder.\n    ///\n    /// ### Examples","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/unicorn/no_abusive_eslint_disable.rs#L5-L41","documentation":"Raised by unicorn/no-abusive-eslint-disable when an `oxlint-disable` comment lists no rules and therefore silences all rules indiscriminately. The helper selects this message for the Oxlint directive prefix; the faulting input is the bare `oxlint-disable` comment at the labeled span.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/unicorn/no_abusive_eslint_disable.rs:23 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Name the exact rules to disable, e.g. `// oxlint-disable-next-line rule-name`","Remove the comment if it is not needed","Address the reported lint issue rather than suppressing 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"}