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
muslnode 18–226 runs
build_error
glibcnode 18–226 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'
}
}
]
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
fixnpm install eslint-plugin-cypress --save-dev
Error: Could not find config file: eslint.config.mjs
Missing or misnamed flat config file
fixCreate 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+
fixUse 'eslint-plugin-cypress' instead of 'eslint-plugin-cypress/flat'
Parsing error: The keyword 'import' is reserved
Using ESM syntax in a CommonJS file
fixSet "type": "module" in package.json or rename file to .mjs
Audit
Dependencies
eslintrequiredpeer dependency required at version >=9