oxlint-cypress
v0.1.0
Published
oxlint plugin — port of eslint-plugin-cypress recommended rules
Readme
oxlint-cypress
oxlint plugin that ports the recommended rules from eslint-plugin-cypress.
Catches common Cypress test anti-patterns that cause flaky or unreliable tests.
Installation
npm install -D oxlint oxlint-cypressUsage
In your oxlint.config.js:
import cypressPlugin from 'oxlint-cypress'
export default {
plugins: { 'cypress': cypressPlugin },
rules: {
'cypress/no-assigning-return-values': 'error',
'cypress/no-async-tests': 'error',
'cypress/no-unnecessary-waiting': 'error',
'cypress/unsafe-to-chain-command': 'error',
},
}Rules
| Rule | What it enforces |
|------|-----------------|
| cypress/no-assigning-return-values | Disallow assigning return values of cy commands |
| cypress/no-async-tests | Disallow async/await in Cypress test functions |
| cypress/no-unnecessary-waiting | Disallow cy.wait(number) — use aliases instead |
| cypress/unsafe-to-chain-command | Disallow chaining commands after action commands |
License
MIT
