Config for projects using Cypress for testing.
-
If you haven't already, make sure to install
@code-pushup/eslint-config
and its required peer dependencies. -
Since this plugin requires additional peer dependencies, you have to install them as well:
npm install -D eslint-plugin-cypress
-
Add to
extends
in your .eslintrc file:{ "extends": ["@code-pushup/eslint-config/cypress"] }
🔧 Automatically fixable by the
--fix
CLI option.
💡 Manually fixable by editor suggestions.
Plugin | Rule | Options | Autofix |
---|---|---|---|
![]() |
no-assigning-return-values Prevent assigning return values of cy calls |
||
![]() |
no-async-tests Prevent using async/await in Cypress test cases |
||
![]() |
no-unnecessary-waiting Prevent waiting for arbitrary time periods |
||
![]() |
unsafe-to-chain-command Actions should be in the end of chains, not in the middle |
Plugin | Rule | Options | Autofix |
---|---|---|---|
![]() |
no-force Disallow using of 'force: true' option for click and type calls |
||
![]() |
no-pause Disallow using of 'cy.pause' calls |