{"id":19719,"library":"eslint-plugin-cypress","title":"eslint-plugin-cypress","description":"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.","status":"active","version":"6.3.1","language":"javascript","source_language":"en","source_url":"https://github.com/cypress-io/eslint-plugin-cypress","tags":["javascript","eslint","eslintplugin","cypress","typescript"],"install":[{"cmd":"npm install eslint-plugin-cypress","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-cypress","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-cypress","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required at version >=9","package":"eslint","optional":false}],"imports":[{"note":"ESM-only since v6; CommonJS require may work but is not recommended","wrong":"const pluginCypress = require('eslint-plugin-cypress')","symbol":"pluginCypress (default)","correct":"import pluginCypress from 'eslint-plugin-cypress'"},{"note":"The /flat subpath was deprecated in v5 and removed in v6","wrong":"import pluginCypress from 'eslint-plugin-cypress/flat'","symbol":"configs.recommended","correct":"import pluginCypress from 'eslint-plugin-cypress'; export default [...pluginCypress.configs.recommended]"},{"note":"CommonJS require may not work in ESM-only projects; use import","wrong":"require('eslint-plugin-cypress').configs.globals","symbol":"configs.globals","correct":"import pluginCypress from 'eslint-plugin-cypress'; export default [...pluginCypress.configs.globals]"},{"note":"Rules are not exported as named imports; access via plugin object","wrong":"import { noAssigingReturnValues } from 'eslint-plugin-cypress/rules'","symbol":"rules","correct":"import pluginCypress from 'eslint-plugin-cypress'; pluginCypress.rules['no-assigning-return-values']"}],"quickstart":{"code":"// eslint.config.mjs\nimport pluginCypress from 'eslint-plugin-cypress'\n\nexport default [\n  {\n    files: ['cypress/e2e/**/*.cy.{js,jsx,ts,tsx}'],\n    ...pluginCypress.configs.recommended,\n    rules: {\n      'cypress/no-unnecessary-waiting': 'warn',\n      'cypress/assertion-before-screenshot': 'warn'\n    }\n  }\n]","lang":"javascript","description":"Set up flat config with recommended rules for Cypress test files, adding custom rules."},"warnings":[{"fix":"Remove '/flat' suffix from import path; use 'eslint-plugin-cypress' directly","message":"Removed deprecated eslint-plugin-cypress/flat configuration in v6","severity":"breaking","affected_versions":">=6.0.0 <7.0.0"},{"fix":"Upgrade ESLint to v9+ and migrate to flat config (eslint.config.mjs)","message":"Requires ESLint v9 or v10; eslintrc configs no longer supported","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Upgrade to v6.0.0 or later, or downgrade to v5.3.0","message":"v5.4.0 was accidentally published with breaking changes from v6.0.0","severity":"deprecated","affected_versions":"5.4.0"},{"fix":"Ensure you are extending one of the provided configs","message":"Globals are only available via configs.globals or configs.recommended; not automatically injected","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Install both packages globally: npm install -g eslint eslint-plugin-cypress","message":"ESLint installed globally requires eslint-plugin-cypress installed globally as well","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install eslint-plugin-cypress --save-dev","cause":"Plugin not installed or ESLint cannot resolve it","error":"Error: Failed to load plugin 'cypress' declared in '...': Cannot find module 'eslint-plugin-cypress'"},{"fix":"Create eslint.config.mjs (or .js/.cjs) in project root","cause":"Missing or misnamed flat config file","error":"Error: Could not find config file: eslint.config.mjs"},{"fix":"Use 'eslint-plugin-cypress' instead of 'eslint-plugin-cypress/flat'","cause":"Using deprecated /flat subpath in v6+","error":"Error: Failed to load config \"eslint-plugin-cypress/flat\" to extend from."},{"fix":"Set \"type\": \"module\" in package.json or rename file to .mjs","cause":"Using ESM syntax in a CommonJS file","error":"Parsing error: The keyword 'import' is reserved"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}