Linting for my angular 10 project is failing wheh running ng lint
node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng lint
It failed with return code 1 and says:
Schema validation failed with the following errors:
Data path "" should have required property 'lintFilePatterns'.
It still lints the files, and prints warnings and errors to the console. But I want to integrate this to into our CI at some point.
Below is my angular.json lint configuration as well as my eslint config
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
},
"configurations": {
"dev": {
"builder": "@angular-eslint/builder:lint",
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
And eslintrc.js
module.exports = {
"root": true,
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true,
"tsconfigRootDir": __dirname,
},
"extends": [
"plugin:@angular-eslint/recommended",
// This is required if you use inline templates in Components
"plugin:@angular-eslint/template/process-inline-templates",
'plugin:@typescript-eslint/recommended',
],
"rules": {
/**
* Any TypeScript source code (NOT TEMPLATE) related rules you wish to use/reconfigure over and above the
* recommended set provided by the @angular-eslint project would go here.
*/
"@angular-eslint/directive-selector": [
"error",
{ "type": "attribute", "prefix": "app", "style": "camelCase" }
],
"@angular-eslint/component-selector": [
"error",
{ "type": "element", "prefix": "app", "style": "kebab-case" }
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
/**
* Any template/HTML related rules you wish to use/reconfigure over and above the
* recommended set provided by the @angular-eslint project would go here.
*/
}
}
]
}
Appreciate any help