How to use the angular-eslint premade configs?

112 Views Asked by At

I'm replace tslint with eslint. After adopting the Anguar-eslint, I follow the readme to add some premade configs like below:

"overrides": [
    {
      "files": [
        "*.ts"
      ],
      "parserOptions": {
        "project": [
          "tsconfig.json"
        ],
        "createDefaultProgram": true
      },
      "extends": [
        "plugin:@angular-eslint/recommended"
      ],
      "rules": {}
    },
    {
      "files": [
        "*.html"
      ],
      "extends": [
        "plugin:@angular-eslint/template/recommended"
      ],
      "rules": {}
    }
  ]
}

When run ng lint, only a few errors are found.
But if I add typescript-eslint recommended configs, thousands errors popup.

"extends": [
    "plugin:@typescript-eslint/recommended",
    "plugin:@angular-eslint/recommended"
],

Does this mean the angular-eslint/recommended does not include typescript-eslint/recommended?
Do I have to add both of them?
What about the eslint:recommended?

1

There are 1 best solutions below

0
On BEST ANSWER

I found this useful link https://github.com/angular-eslint/angular-eslint/issues/1174

As of v15, all new workspaces will extend from the eslint:recommended and plugin:@typescript-eslint:recommended configs