1

I've migrated an Angular 14 project from tslint to eslint with these steps:

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

in VsCode if I remove a semicolon or I changed === to == or = there is no warning shown

If I add semicolon rule "semi": [2, "always"] as here

I see in VsCode: Missing semicolon. eslint(semi)[Ln 10,Col 12]

Do I have to manually add all possible rules in .eslintrc.json file?

default eslintrc.json content :

  {
  "root": true,
  "ignorePatterns": [
    "projects/**/*"
  ],
  "overrides": [
    {
      "files": [
        "*.ts"
      ],
      "parserOptions": {
        "project": [
          "tsconfig.json",
          "e2e/tsconfig.json"
        ],
        "createDefaultProgram": true
      },
      "extends": [
        "plugin:@angular-eslint/recommended",
        "plugin:@angular-eslint/template/process-inline-templates"
      ],
      "rules": {
        "semi": [2, "always"], // added by me
        "@angular-eslint/component-selector": [
          "error",
          {
            "prefix": "app",
            "style": "kebab-case",
            "type": "element"
          }
        ],
        "@angular-eslint/directive-selector": [
          "error",
          {
            "prefix": "app",
            "style": "camelCase",
            "type": "attribute"
          }
        ]
      }
    },
    {
      "files": [
        "*.html"
      ],
      "extends": [
        "plugin:@angular-eslint/template/recommended"
      ],
      "rules": {}
    }
  ]
}
mrapi
  • 5,831
  • 8
  • 37
  • 57

0 Answers0