How to exclude index.html from linting by @angular-eslint/template? #1213
-
If I add "index.html" to excluded files, when I get this error:
My {
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": ["plugin:@typescript-eslint/recommended", "plugin:@angular-eslint/recommended"],
"rules": {}
},
{
"files": ["*.html"],
"excludedFiles": ["src/index.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
} If I add "index.html" to |
Beta Was this translation helpful? Give feedback.
Answered by
JamesHenry
Nov 20, 2022
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
belyan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
excludedFiles
excludes the file from consideration for that override block. So what you are doing is instructing ESLint not to use the Angular HTML parsing logic and fallback to its default (JavaScript) which of course blows up on HTML.ignorePatterns
or using a.eslintignore
file is the way to go