An ESLint plugin that enforces best practices and provides linting rules for Cypress test code.
eslint-plugin-cypress is an ESLint plugin that provides linting rules and configurations specifically for Cypress test files. It helps developers enforce best practices, avoid common anti-patterns, and maintain code quality in their Cypress end-to-end tests. The plugin includes recommended rules that catch issues like unnecessary waiting, unsafe command chaining, and improper use of async/await in Cypress contexts.
Developers and teams writing end-to-end tests with Cypress who want to improve test reliability, maintainability, and adherence to Cypress best practices through automated linting.
It offers a curated set of rules based on official Cypress recommendations, reducing manual code review effort and preventing common testing mistakes. Unlike generic ESLint configurations, it understands Cypress-specific patterns and globals.
An ESLint plugin for projects that use Cypress
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Encodes Cypress-recommended patterns like avoiding cy.wait() overuse and unsafe chaining, reducing common test flakiness and errors directly from the source.
Pre-configures Cypress-specific globals such as cy and Cypress, eliminating undefined variable warnings without manual ESLint setup for test files.
Fully supports ESLint v9+ flat config format, ensuring alignment with the latest tooling standards and future-proof configurations.
Designed to work with ESLint plugins for Mocha and Chai-friendly, providing a cohesive linting experience for the entire Cypress testing stack, as shown in the README examples.
Dropped support for ESLint v8 and eslintrc files forces teams to upgrade and rewrite configurations, which can be disruptive for established projects.
Rules like no-async-tests and no-unnecessary-waiting are enabled in the recommended config, potentially conflicting with valid testing strategies and requiring frequent disabling.
Exclusively targets Cypress tests, offering no utility for other code areas or mixed testing frameworks, making it a single-purpose tool in diverse environments.