Display es-lint html errors in Intellij/Webstorm

Viewed 912

I've set up es-lint for my Angular project. Everything works fine, except error highlighting in html files in the Intellij/Webstorm IDE. I want to display an error if I use a method in a template.

.eslintrc.json

{
    "root": true,
    "ignorePatterns": [
        "projects/**/*"
    ],
    "overrides": [
        {
            "files": [
                "*.html"
            ],
            "extends": [
                "plugin:@angular-eslint/template/recommended"
            ],
            "rules": {
                "@angular-eslint/template/no-call-expression": "error"
            }
        }
    ]
}

ng lint output enter image description here

html file in IDE enter image description here

dev packages

"devDependencies": {
    "@angular-devkit/build-angular": "~0.1100.5",
    "@angular-eslint/builder": "0.8.0-beta.7",
    "@angular-eslint/eslint-plugin": "0.8.0-beta.7",
    "@angular-eslint/eslint-plugin-template": "0.8.0-beta.7",
    "@angular-eslint/schematics": "^0.8.0-beta.7",
    "@angular-eslint/template-parser": "0.8.0-beta.7",
    "@angular/cli": "~11.0.5",
    "@angular/compiler-cli": "~11.0.5",
    "@types/jasmine": "~3.6.0",
    "@types/node": "^12.11.1",
    "@typescript-eslint/eslint-plugin": "4.3.0",
    "@typescript-eslint/parser": "4.3.0",
    "codelyzer": "^6.0.0",
    "eslint": "^7.6.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsdoc": "30.7.6",
    "eslint-plugin-prefer-arrow": "1.2.2",
    "jasmine-core": "~3.6.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.1.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "prettier": "2.2.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "typescript": "~4.0.2"
  }

If I run ng lint, it correctly outputs the errors, however, in my IDE I can't see any issue highlighted. However if I set a rule for a ts file, it displays correctly even in IDE. My eslint settings are set to automatic inside the IDE:

enter image description here

1 Answers

Please try adding html to eslint.additional.file.extensions list in Registry (Help > Find Action..., type registry... to locate it) and re-start the IDE

Related