Upgrading to EsLint: Error with angular.json (schematics:convert-tslint-to-eslint)

Viewed 568

I wanted to upgrade my project to ESLint and was following this tutorial:

https://blog.ninja-squad.com/2021/03/31/migrating-from-tslint-to-eslint/

I did the first command, ng add @angular-eslint/schematics, which worked. But then, after executing ng g @angular-eslint/schematics:convert-tslint-to-eslint your_project_name I got the following error: enter image description here

I looked at this post already: How to run @angular-eslint/schematics:convert-tslint-to-eslint, but nothing about it helped.

This seems like an easy error to google but either I searched incorrectly or this really is some unusual problem. Obviously, I cannot delete the angular.json file. What might cause this?

My TsLint version: 6.1.0

My Angular version: 12.0.2

Note that I upgraded to Angular 12 a week ago, before it was Angular 11.

2 Answers

I tried the same upgrade in my project and added

  "cli": {
    "analytics": false,
    "defaultCollection": "@angular-eslint/schematics"
  },

in my angular.json manually. After this I could continue with no errors.

Related