Just specify the same version for each package at installation:
Copyng update @angular/core@12 @angular/cli@12
ng update @angular-eslint/schematics@12
Answer from Adnan on Stack Overflow
» npm install @angular-eslint/schematics
problem installing Angular-eslint/schematics.
ng add @angular-eslint/schematics adds incorrect version, throws error
How to run @angular-eslint/schematics:convert-tslint-to-eslint - Stack Overflow
How To Automatically Remove Unused Angular Imports?
Videos
Just specify the same version for each package at installation:
Copyng update @angular/core@12 @angular/cli@12
ng update @angular-eslint/schematics@12
For me the fix was to run the @angular-eslint/schematics update together with the @angular/core@12 @angular/cli@12 update.
Upgrading to Angular 17
Copyng update @angular/core@17 @angular/cli@17 @angular-eslint/schematics@17
Well i think that angular 17 is now quite common
Though i notice that the angular Eslint package
peer u/angular/cli@">= 16.0.0 < 17.0.0" from u/angular-eslint/schematics@16.3.1
shouldnt they have used ^17.0.0 ?.
even when installed by :
npm i https://github.com/angular-eslint/angular-eslint.git
Then as currently y angular cli is at 17.3.5, the installer leaves
"@angular-eslint/schematics": "^16.1.1" ??
In case you don't know which is the name of your project when the CLI asks you
Which project would you like to convert from TSLint to ESLint?
it can be found in the angular.json under the projects attribute (normally on line 8)
It depends on the Angular version of your project because it install a different version of @angular-eslint/schematics for different angular versions
Steps will be:
A. Add @angular-eslint to your project:
ng add @angular-eslint/schematics
If you have an Angular 12 project (without tslint), you’re done!
B. For migration from tslint Angular 11 or 12, run the following:
ng g @angular-eslint/schematics:convert-tslint-to-eslint --remove-tslint-if-no-more-tslint-targets
(Use: --ignore-existing-tslint-config flag only if you want to ignore old tslint configuration)
If you are on Angular 9 or 10, an older version of the schematic gets installed and the convert command differs slightly. You may want to prioritize upgrading Angular before converting to ESLint. But if you really want to upgrade linting first, use this command:
ng g @angular-eslint/schematics:convert-tslint-to-eslint <project-name-here>
Detailed blog for tslint to eslint migration