I'm trying to switch an Angular project from TSLint to ESLint, following the instructions in angular-eslint Github repo.
I ran ng add @angular-eslint/schematics
which added the following dependencies to my package.json:
"@angular-eslint/builder": "1.2.0",
"@angular-eslint/eslint-plugin": "1.2.0",
"@angular-eslint/eslint-plugin-template": "1.2.0",
"@angular-eslint/schematics": "1.2.0",
"@angular-eslint/template-parser": "1.2.0",
"@typescript-eslint/eslint-plugin": "4.3.0",
"@typescript-eslint/parser": "4.3.0",
"eslint": "7.6.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.6",
"eslint-plugin-prefer-arrow": "1.2.2",
Also, ran npm install
to ensure these are all installed.
Now I'm instructed to run:
ng g @angular-eslint/schematics:convert-tslint-to-eslint --remove-tslint-if-no-more-tslint-targets --ignore-existing-tslint-config
However, this results in errors:
Unknown option: '--remove-tslint-if-no-more-tslint-targets'
Unknown option: '--ignore-existing-tslint-config'
When I remove these options, I get another error:
Invalid rule result: Instance of class Promise.
It seems like this angular-eslint schematic was not installed properly. However, I'm a complete novice regarding these schematics. I must be missing something obvious here.
Using @angular/cli 10.2.3.
"projects"
entry ... in my case it was"ng"
. – Plenary