Registry / testing / eslint-plugin-cypress

eslint-plugin-cypress

JSON →
library6.3.1jsnpmunverified

An ESLint plugin providing lint rules and configurations for projects using Cypress testing framework. Current stable version is 6.3.1, released April 2026, with frequent minor/patch releases. Maintained by Cypress.io. Key differentiators: official Cypress linting, supports ESLint v9 and v10 (flat config only), TypeScript types included, provides globals and recommended configurations. Dropped support for legacy eslintrc config files in v6; flat config required.

npm install eslint-plugin-cypress
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-CYPR
E
eslint-plugin-cypress
testingjavascriptv6.3.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pluginCypress (default)
import pluginCypress from 'eslint-plugin-cypress'
const pluginCypress = require('eslint-plugin-cypress')
ESM-only since v6; CommonJS require may work but is not recommended
configs.recommended
import pluginCypress from 'eslint-plugin-cypress'; export default [...pluginCypress.configs.recommended]
import pluginCypress from 'eslint-plugin-cypress/flat'
The /flat subpath was deprecated in v5 and removed in v6
configs.globals
import pluginCypress from 'eslint-plugin-cypress'; export default [...pluginCypress.configs.globals]
require('eslint-plugin-cypress').configs.globals
CommonJS require may not work in ESM-only projects; use import
rules
import pluginCypress from 'eslint-plugin-cypress'; pluginCypress.rules['no-assigning-return-values']
import { noAssigingReturnValues } from 'eslint-plugin-cypress/rules'
Rules are not exported as named imports; access via plugin object

Set up flat config with recommended rules for Cypress test files, adding custom rules.

// eslint.config.mjs import pluginCypress from 'eslint-plugin-cypress' export default [ { files: ['cypress/e2e/**/*.cy.{js,jsx,ts,tsx}'], ...pluginCypress.configs.recommended, rules: { 'cypress/no-unnecessary-waiting': 'warn', 'cypress/assertion-before-screenshot': 'warn' } } ]
Debug
Known issues
breakingRemoved deprecated eslint-plugin-cypress/flat configuration in v6
fix
Remove '/flat' suffix from import path; use 'eslint-plugin-cypress' directly
affects: >=6.0.0 <7.0.0
breakingRequires ESLint v9 or v10; eslintrc configs no longer supported
fix
Upgrade ESLint to v9+ and migrate to flat config (eslint.config.mjs)
affects: >=6.0.0
deprecatedv5.4.0 was accidentally published with breaking changes from v6.0.0
fix
Upgrade to v6.0.0 or later, or downgrade to v5.3.0
affects: 5.4.0
gotchaGlobals are only available via configs.globals or configs.recommended; not automatically injected
fix
Ensure you are extending one of the provided configs
affects: >=3.0.0
gotchaESLint installed globally requires eslint-plugin-cypress installed globally as well
fix
Install both packages globally: npm install -g eslint eslint-plugin-cypress
affects: all
Errors
Common errors & fixes
Error: Failed to load plugin 'cypress' declared in '...': Cannot find module 'eslint-plugin-cypress'
Plugin not installed or ESLint cannot resolve it
fix
npm install eslint-plugin-cypress --save-dev
Error: Could not find config file: eslint.config.mjs
Missing or misnamed flat config file
fix
Create eslint.config.mjs (or .js/.cjs) in project root
Error: Failed to load config "eslint-plugin-cypress/flat" to extend from.
Using deprecated /flat subpath in v6+
fix
Use 'eslint-plugin-cypress' instead of 'eslint-plugin-cypress/flat'
Parsing error: The keyword 'import' is reserved
Using ESM syntax in a CommonJS file
fix
Set "type": "module" in package.json or rename file to .mjs
Upgrade
Version history
6.3.1latest on npm
Audit
Dependencies
eslintrequiredpeer dependency required at version >=9
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-cypress — npm install eslint-plugin-cypress · libregistry