Reputation: 43
Is there is a way to get all deprecated elements in my angular project? (like functions, properties, etc.) so I can change everything without looking one .ts file at a time. If it's usefoul to know, i'm using visual studio Code.
Thanks!
Upvotes: 1
Views: 56
Reputation: 17758
To list usage of deprecated TypeScript functionality, you can setup TypeScript ESLint and enable the @typescript-eslint/no-deprecated
rule. Now run the ESLint CLI in your project, and you will get a list with all reported lint errors: npx eslint .
Note that this only works if the deprecated code is annotated with the @deprecated
JSDoc tag. Also it will only work for the TypeScript code, the templates, styles and other files are not checked for deprecations.
Upvotes: 2