Skip to main content

Disallow unused variables (no-unused-vars)

Rule Details

This rule extends the base eslint/no-unused-vars rule. It adds support for TypeScript features, such as types.

How to Use

// note you must disable the base rule as it can report incorrect errors
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"]


See eslint/no-unused-vars options.

Taken with โค๏ธ from ESLint core


  • โœ… Recommended
  • ๐Ÿ”ง Fixable
  • ๐Ÿ’ญ Requires type information