Currently using
"eslint": "^8.23.0"
with angular 14.Everything was functioning properly with
"eslint": "^8.22.0"
, but after updating to 8.23.0
, I encountered the following error:
https://i.sstatic.net/UALvS.png
https://i.sstatic.net/itVQu.png
This is my eslint configuration:
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts",
"*.js",
"*.tsx"
],
"parserOptions": {
"project": [
"tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
... // additional rules omitted for brevity
}
},
{
"files": [
"*.html",
"*.css"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {
... // additional rules omitted for brevity
}
}
]
}
The specific section causing trouble is the indent
configuration:
"indent": [
"error",
2,
{
"SwitchCase": 1
}
]
I experimented with this alternate configuration:
"indent": [
"error",
2,
{
"SwitchCase": 1,
"ArrayExpression": "first"
}
]
I even modified the eslint
config like so:
"indent": "off",
"@typescript-eslint/indent": [
"error",
2,
{
"SwitchCase": 1
}
],
However, these changes did not resolve the issue!