From 710c5b74d37c47471184247476a8da05e713087f Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Mon, 7 Jan 2019 16:53:24 +0100 Subject: [PATCH] Add eslint rules for cypress --- .eslintrc | 11 ++++++++--- package.json | 2 ++ yarn.lock | 12 ++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.eslintrc b/.eslintrc index a2540fde..30b99d6a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,7 +10,8 @@ }, "env": { "browser": true, - "jest": true + "jest": true, + "cypress/globals": true }, "rules": { "import/prefer-default-export": 0, @@ -32,13 +33,17 @@ "new-cap": 0, "max-len": 0, "eol-last": 0, - "spaced-comment": 0 + "spaced-comment": 0, + "no-unused-expressions": 0, + "chai-friendly/no-unused-expressions": 2 }, "plugins": [ "import", "react", "jest", - "flowtype" + "flowtype", + "cypress", + "chai-friendly" ], "settings": { "import/resolver": { diff --git a/package.json b/package.json index e7d4a6ab..928f25ba 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,8 @@ "eslint-config-airbnb": "^17.0.0", "eslint-import-resolver-babel-module": "^4.0.0", "eslint-loader": "^2.1.0", + "eslint-plugin-chai-friendly": "^0.4.1", + "eslint-plugin-cypress": "^2.2.0", "eslint-plugin-flowtype": "^2.50.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-jest": "^21.18.0", diff --git a/yarn.lock b/yarn.lock index 87673ff2..a7d63c5a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3701,6 +3701,18 @@ eslint-module-utils@^2.2.0: debug "^2.6.8" pkg-dir "^1.0.0" +eslint-plugin-chai-friendly@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-0.4.1.tgz#9eeb17f92277ba80bb64f0e946c6936a3ae707b4" + integrity sha512-hkpLN7VVoGGsofZjUhcQ+sufC3FgqMJwD0DvAcRfxY1tVRyQyVsqpaKnToPHJQOrRo0FQ0fSEDwW2gr4rsNdGA== + +eslint-plugin-cypress@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.2.0.tgz#31f23bec82eb4078711b374af66af3daa9fdbd2e" + integrity sha512-Xk1DMXPfnSChpNhQPw8E9lfRUse9nSyPccxMbKlOuwCmTm2fhyNQWfulDr9DDgUL1Xetdub5lnYQkKniHjNbYw== + dependencies: + globals "^11.0.1" + eslint-plugin-flowtype@^2.50.0: version "2.50.0" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.0.tgz#953e262fa9b5d0fa76e178604892cf60dfb916da"