Skip to content

Commit

Permalink
Add Cypress plugin for linter
Browse files Browse the repository at this point in the history
https://typescript-eslint.io/rules/no-require-imports/
There was a complaint from ESLint about the use of require in the `cypress.config.ts` file.

There is a Cypress plugin for ESLint https://github.com/cypress-io/eslint-plugin-cypress and this approach to adding it to the `.eslintrc.json` is suggested in the history of the project. The project claims you need to be using ESLint 9 or greater, which we probably should look into, and it might mean that this plugin would need to be updated manually in that migration process. I have a PR for that migration as well:
#1664
  • Loading branch information
kklamberty committed Jan 21, 2025
1 parent 4c4b700 commit a3f1825
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"files": ["*.ts"],
"extends": [
"eslint:recommended",
// This helps the linter deal more kindly with the Cypress configuration file `cypress.config.ts`
"plugin:cypress/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
// This is required if you use inline templates in Components
Expand Down

0 comments on commit a3f1825

Please sign in to comment.