angularmigrationeslinttslintangular17

error attempting to use convert-tslint-to-eslint


The first step

    ng add @angular-eslint/schematics

executes successfully but the second step

    ng g @angular-eslint/schematics:convert-tslint-to-eslint

produces this error:

    Error: The `convert-tslint-to-eslint` schematic is no longer supported.

    Please see https://github.com/angular-eslint/angular-eslint/blob/main/docs/MIGRATING_FROM_TSLINT.md

and the readme document referenced in the error message is the one I was following to attempt this migration.

I successfully used this schematic about about three weeks ago.

Has anyone else encountered this error message? Know of a workaround?

Angular CLI: 17.0.7
Node: 18.13.0
Package Manager: npm 8.19.3
OS: darwin x64

Angular: 17.0.7
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.7
@angular-devkit/build-angular   17.0.7
@angular-devkit/core            17.0.7
@angular-devkit/schematics      17.0.7
@schematics/angular             17.0.7
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.2

Solution

  • If you were using tslint with an earlier version of Angular, then this tslint to eslint conversion should have been done at a stage when Angular version less than 16.

    From MIGRATING_FROM_TSLINT.md,

    As a community project we need to focus on what adds the most value to the majority of our users, and so, in version 16, this conversion tooling was removed.

    If you want to leverage it, you can of course use it on a major version of Angular + angular-eslint prior to version 16, or you can feel free to take the implementation from our git history and leverage the schematics inline in your own projects.