Fix Cypress tests ESLint errors

Published on August 19th, 2019

eslint icon

If you have recently tried using Cypress in project with ESLint, you’ve probably been greeted with a ton of errors. Luckily fix is quick and easy.

First thing we have to do is to install ESLint plugin.

yarn add -D eslint-plugin-cypress

After that you need to create .eslintrc file in cypress directory and populate it with following configuration.

{
  "extends": ["plugin:cypress/recommended"]
}

And that’s it! ESLint won’t complain about your tests anymore!