My Angular 13 project is coded in Typescript and utilizes eslint for code checking. Recently, I integrated Cypress into the project. However, I noticed that when I run the command ng lint, it does not scan the files within the /cypress directory. Interestingly, Visual Studio Code is able to detect errors in those files.
.eslintrc.json
{
"root": true,
"ignorePatterns": [
"projects/**/*",
"cypress/fixtures/**/*",
"cypress/integration-original/**/*.js",
"src/**/*.spec.ts",
"src/**/*.mock.ts"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"eslint:recommended",
"plugin:@angular-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"deprecation"
],
"rules": { ... }
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
Within the Angular project, the folder structure includes:
-cypress
-node_modules
-src
.eslintrc.json
tsconfig.json
...