{"record":{"id":"aa91767a8bd6522d","repo":"oxc-project/oxc","slug":"pronoun-name-is-verb-but-never-used-suffi","errorCode":null,"errorMessage":"{pronoun} '{name}' is {verb} but never used.{suffix}","messagePattern":"(.+?) '(.+?)' is (.+?) but never used\\.(.+?)","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"warning","filePath":"crates/oxc_linter/src/rules/eslint/no_unused_vars/diagnostic.rs","lineNumber":82,"sourceCode":"    pat: &IgnorePattern<R>,\n    only_used_as_type: bool,\n) -> OxcDiagnostic\nwhere\n    R: fmt::Display,\n{\n    let (verb, help) = if symbol.flags().is_catch_variable() {\n        (\"caught\", \"Consider handling this error.\")\n    } else {\n        (\"declared\", \"Consider removing this declaration.\")\n    };\n    let name = symbol.name();\n    let (pronoun, pronoun_plural) = pronoun_for_symbol(symbol.flags());\n    let suffix = pat.diagnostic_help(pronoun_plural);\n\n    OxcDiagnostic::warn(if only_used_as_type {\n        format!(\"{pronoun} is {verb} but only used as a type.{suffix}\")\n    } else {\n        format!(\"{pronoun} '{name}' is {verb} but never used.{suffix}\")\n    })\n    .with_label(symbol.span().label(format!(\"'{name}' is declared here\")))\n    .with_help(help)\n}\n\n/// Variable 'x' is assigned a value but never used.\npub fn assign<R>(\n    symbol: &Symbol<'_, '_>,\n    assign_span: Span,\n    pat: &IgnorePattern<R>,\n) -> OxcDiagnostic\nwhere\n    R: fmt::Display,\n{\n    let name = symbol.name();\n    let (pronoun, pronoun_plural) = pronoun_for_symbol(symbol.flags());\n    let suffix = pat.diagnostic_help(pronoun_plural);\n","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/eslint/no_unused_vars/diagnostic.rs#L64-L100","documentation":"Core no-unused-vars message: a binding ({pronoun}: Variable, Class, Function...) is declared, or a catch parameter is caught ({verb}), but never referenced anywhere in value or type positions. The label points at the declaration span.","triggerScenarios":"const x = 1; with no later reads; catch (e) {} where e is unused; a declared helper never called; destructured values never consumed.","commonSituations":"Refactors that removed call sites; feature flags read elsewhere; leftover scaffolding; catch blocks that intentionally swallow errors.","solutions":["Delete the declaration if it is truly unnecessary.","Rename to _name or _ to signal intent, matching the default ignore convention.","For unused catch bindings, omit the parameter entirely: catch { /* ... */ }.","For systematic cases set varsIgnorePattern / caughtErrors options on the rule in .oxlintrc.json."],"exampleFix":"// before\nconst cache = new Map();\nfunction f() { return 1; }\n// after\n// (unused declarations removed, or rename to _cache if kept deliberately)","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run oxlint --deny-warnings in CI so unused bindings never reach main.","Adopt the underscore convention (_ or _name) for intentionally unused bindings.","Omit catch bindings you do not use: catch { ... }.","Remove declarations in the same commit that removes their last consumer."],"tags":["eslint","oxlint","unused-vars","dead-code"],"backgroundTag":"unused-variable","analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}