Following the upgrade of Angular from 9 to 10 and running npm run lint
, a peculiar issue arose
> ng lint --fix
Schema validation failed with the following errors:
Data path "" should NOT have additional properties(tsConfig).
The configuration in my angular.json is as follows:
..."lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"eslintConfig": ".eslintrc.js",
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": ["**/node_modules/**"]
}
},...
Here are the devDependencies listed in my package.json:
..."@angular-devkit/build-angular": "~0.1001.1",
"@angular-eslint/builder": "0.3.0-beta.1",
"@angular-eslint/eslint-plugin": "0.0.1-alpha.32",
"@angular-eslint/eslint-plugin-template": "0.0.1-alpha.32",
"@angular-eslint/template-parser": "0.0.1-alpha.32",
"@angular/cli": "~10.1.0",
"@angular/compiler-cli": "~10.1.1",
"@angular/language-service": "~10.1.1",
"@types/file-saver": "^2.0.1",
"@types/google-libphonenumber": "^7.4.19",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@typescript-eslint/eslint-plugin": "2.31.0",
"@typescript-eslint/parser": "2.31.0",
"codelyzer": "^5.2.2",
"eslint": "^7.6.0",
"eslint-config-airbnb-typescript": "^8.0.2",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-prettier": "^3.1.4",...
Upon changing 'tsConfig' to 'lintFilePatterns', an error was triggered by the CLI:
error Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: tsconfig.app.json.
The extension for the file (.json) is non-standard. You should add "parserOptions.extraFileExtensions" to your config
What steps should be taken next?