Skip to content

linters/eslint-rules/no-used-underscore-variables

ESLint rule: no-used-underscore-variables

Reports an error when a parameter or local variable with a _ prefix is actually referenced in the function body. The _ prefix convention signals “this identifier is intentionally unused” — if it IS used, the prefix is misleading and should be removed.

Variable Description
MESSAGE_ID Message ID reported when a variable carries a _ prefix (signalling unused) but is actually used.
noUsedUnderscoreVariables ESLint rule disallowing _-prefixed parameters and local variables that are actually used, since the prefix advertises them as unused.