diff --git a/packages/@vue/cli-plugin-e2e-cypress/generator/template/test/e2e/_eslintrc b/packages/@vue/cli-plugin-e2e-cypress/generator/template/test/e2e/_eslintrc index 93f7effbc5..eeb5a777d4 100644 --- a/packages/@vue/cli-plugin-e2e-cypress/generator/template/test/e2e/_eslintrc +++ b/packages/@vue/cli-plugin-e2e-cypress/generator/template/test/e2e/_eslintrc @@ -1,13 +1,11 @@ <%_ if (hasESLint) { _%> { + "plugins": [ + "cypress" + ], "env": { - "mocha": true - }, - "globals": { - "cy": false, - "Cypress": false, - "expect": false, - "assert": false + "mocha": true, + "cypress/globals": true } } <%_ } _%> diff --git a/packages/@vue/cli-plugin-e2e-cypress/package.json b/packages/@vue/cli-plugin-e2e-cypress/package.json index 9644f9bbb7..e7873f1881 100644 --- a/packages/@vue/cli-plugin-e2e-cypress/package.json +++ b/packages/@vue/cli-plugin-e2e-cypress/package.json @@ -22,6 +22,7 @@ "access": "public" }, "dependencies": { - "cypress": "^1.4.1" + "cypress": "^1.4.1", + "eslint-plugin-cypress": "^2.0.1" } } diff --git a/yarn.lock b/yarn.lock index 1f5cbf1550..777727d48f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3400,6 +3400,12 @@ eslint-module-utils@^2.1.1: debug "^2.6.8" pkg-dir "^1.0.0" +eslint-plugin-cypress@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.0.1.tgz#647e942cacbfd71b0f1a1ed6978472fbd475c60a" + dependencies: + globals "^11.0.1" + eslint-plugin-html@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-html/-/eslint-plugin-html-4.0.1.tgz#fc70072263cc938496fbbc9cf648660e41fa269a"