no-unused-vars
Disallow unused variables.
✅
Extending "plugin:@typescript-eslint/recommended"
in an ESLint configuration enables this rule.
Examples
This rule extends the base eslint/no-unused-vars
rule.
It adds support for TypeScript features, such as types.
Options
.eslintrc.cjs
module.exports = {
"rules": {
// 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.
How to Use
Resources
Taken with ❤️ from ESLint core