How to fix "no-unused-variable is deprecated" in tslint

angular tslint Tutorials typescript

This error you can face while running ng lint in Angular application:

no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.

To fix this error you need to remove no-unused-variable flag from tslint.json. In your next run of ng lint an error will disappear:

no-unused-variable flag

This parameter is deprecated because Typescript has some functionality to avoid unused variables.

comments powered by Disqus