Adding plugin:prettier/recommended to the eslintrc.json the ng lint goes infinite

282 Views Asked by At

If I use plugin:prettier/recommended to the exlintrc.json the ng lint goes infinite.

.eslintrc.json

{
  "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",
        "plugin:prettier/recommended"
      ],
      "rules": {
        "@angular-eslint/component-selector": [
          "error",
          {
            // "prefix": "app",
            "style": "kebab-case",
            "type": "element"
          }
        ],
        "@angular-eslint/directive-selector": [
          "error",
          {
            // "prefix": "app",
            "style": "camelCase",
            "type": "attribute"
          }
        ],
        "@angular-eslint/no-host-metadata-property": "off",
        "@angular-eslint/no-output-on-prefix": "off",
        "@angular-eslint/no-output-native":"off",
        "@angular-eslint/no-input-rename": "off"
      }
    },
    {
      "files": [
        "*.html"
      ],
      "extends": [
        "plugin:@angular-eslint/template/recommended"
      ],
      "rules": {
        "@angular-eslint/template/eqeqeq": "off"
      }
    }
  ]
}

On the same root directory, I have the .prettierrc file with below config

{
    "semi": true,
    "trailingComma": "all",
    "singleQuote": true,
    "printWidth": 70
  }

When I run ng lint the build goes infinite. If I don't use "plugin:prettier/recommended" the lint works

0

There are 0 best solutions below