{"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,"search_vec":"'2026':26 '6.3.1':23 'april':25 'config':45,60,65 'configur':12,54 'current':19 'cypress':4,16,37,70 'cypress.io':33 'differenti':35 'drop':55 'eslint':2,6,40,68 'eslint-plugin-cypress':1 'eslintplugin':69 'eslintrc':59 'file':61 'flat':44,64 'framework':18 'frequent':28 'global':51 'includ':49 'javascript':67 'key':34 'legaci':58 'lint':9,38 'maintain':31 'minor/patch':29 'offici':36 'plugin':3,7 'project':14 'provid':8,50 'recommend':53 'releas':24,30 'requir':66 'rule':10 'stabl':20 'support':39,56 'test':17 'type':48 'typescript':47,71 'use':15 'v10':43 'v6':63 'v9':41 'version':21","created_at":"2026-04-25T11:19:17.141858+00:00","updated_at":"2026-04-25T11:19:17.141858+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://www.cypress.io","github":"https://github.com/cypress-io/eslint-plugin-cypress","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-plugin-cypress","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}