diff --git a/.eslintrc.json b/.eslintrc.json index b53e55df..f898798b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,13 +1,15 @@ { "extends": ["eslint:recommended", "plugin:prettier/recommended"], - "plugins": ["prettier", "@amplitude/eslint-plugin-amplitude"], + "plugins": ["prettier", "mocha", "@amplitude/eslint-plugin-amplitude"], "env": { "es6": true, "browser": true, "node": true, "mocha": true }, "parserOptions": { "sourceType": "module", "ecmaVersion": 2018 }, "rules": { - "prettier/prettier": "error" + "prettier/prettier": "error", + "mocha/no-skipped-tests": "error", + "mocha/no-exclusive-tests": "error" }, "globals": { "BUILD_COMPAT_REACT_NATIVE": "readonly", diff --git a/package.json b/package.json index 1ea876a8..97d2dfd4 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "date-fns": "^1.30.1", "eslint": "^7.15.0", "eslint-config-prettier": "^7.0.0", + "eslint-plugin-mocha": "^8.0.0", "eslint-plugin-prettier": "^3.3.1", "express": "^4.16.2", "fs-extra": "^4.0.2", diff --git a/yarn.lock b/yarn.lock index 1b92f948..a03e5498 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2799,6 +2799,14 @@ eslint-config-prettier@^7.0.0: resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.0.0.tgz#c1ae4106f74e6c0357f44adb076771d032ac0e97" integrity sha512-8Y8lGLVPPZdaNA7JXqnvETVC7IiVRgAP6afQu9gOQRn90YY3otMNh+x7Vr2vMePQntF+5erdSUBqSzCmU/AxaQ== +eslint-plugin-mocha@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-8.0.0.tgz#7ec5d228bcb3735301701dfbc3376320a1ca3791" + integrity sha512-n67etbWDz6NQM+HnTwZHyBwz/bLlYPOxUbw7bPuCyFujv7ZpaT/Vn6KTAbT02gf7nRljtYIjWcTxK/n8a57rQQ== + dependencies: + eslint-utils "^2.1.0" + ramda "^0.27.1" + eslint-plugin-prettier@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" @@ -6681,6 +6689,11 @@ qw@~1.0.1: resolved "https://registry.yarnpkg.com/qw/-/qw-1.0.1.tgz#efbfdc740f9ad054304426acb183412cc8b996d4" integrity sha1-77/cdA+a0FQwRCassYNBLMi5ltQ= +ramda@^0.27.1: + version "0.27.1" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9" + integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw== + range-parser@^1.2.0, range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e"