Source: I am the maintainer of the typescript-eslint
project.
The latest version of the @typescript-eslint
tooling now has full support for scope analysis.
So the steps to fix this are now:
- update your versions to at least v4.9.1 of
@typescript-eslint/parser
and@typescript-eslint/eslint-plugin
- update your ESLint version to at least v6.0.0
- update your config to use
@typescript-eslint/no-unused-vars
- Do not use the base
no-unused-vars
rule – see this FAQ article in the project.
- Do not use the base
Restart your IDE and you should now see the correct lint errors.