Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

229
Vistas
Is there an extension of CLI command to find all deprecated methods used in a project?

While working on individual files if a deprecated method is used VS Code puts a helpful strikethrough over it. Is there a way to do a search of a whole project (Angular in my case) to flag all deprecated methods that are currently being used without having to go through each and every file?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You can indeed use the linter for that. If it doesn't show deprecated code, you will need to configure this in your linter first.

Check these links for more information on how, for ESLint & TSLint.

You want to add the mentioned configuration under "rules" in either tslint.json or .eslintrc.

In tslint.json:

"rules": {
    "deprecation": {
      "severity": "warning"
    },
}

In .eslintrc.json:

"overrides": [
    {
      "files": ["*.ts"],
      ...
      "plugins": ["deprecation"],
      ...
      "rules": {
        "deprecation/deprecation": "warn",
        ...
      }
      ...
]

Make sure to install this plugin first for ESLint.

npm i eslint-plugin-deprecation --save-dev

If you are creating a new project with Angular 12, you might first have to install a linter. I would suggest using ESLint, as TSLint has been deprecated by Palantir for almost a year now.

npm i @angular-eslint/schematics --save-dev

After that you can just run this in your terminal:

ng lint

Some, but not all rules can be fixed automatically with:

ng lint --fix

In your case though, fixing deprecated code will have to happen manually.

over 4 years ago · Santiago Trujillo Denunciar

0

Use ng lint command, that will highlight all such things.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda