From fc11f7a556d4d4370c85d52a57c50f9985f9a538 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Sat, 21 Oct 2017 11:11:13 -0700 Subject: [PATCH] Add ESLint rule that catches `describe.only`, `it.only` --- .eslintrc | 6 ++++-- package.json | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 09f6fe2e..e2b4d6ac 100644 --- a/.eslintrc +++ b/.eslintrc @@ -16,7 +16,8 @@ "extends": ["eslint:recommended", "plugin:react/recommended"], "plugins": [ - "react" + "react", + "mocha" ], "rules": { @@ -32,6 +33,7 @@ "comma-dangle": 0, "no-console": ["error", { allow: ["warn", "error"] }], "react/jsx-no-bind": 1, - "react/display-name": 0 + "react/display-name": 0, + "mocha/no-exclusive-tests": "error" } } diff --git a/package.json b/package.json index 73bd9aef..dbaa1c80 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,7 @@ "enzyme": "^2.7.1", "eslint": "^4.1.1", "eslint-plugin-import": "^2.6.0", + "eslint-plugin-mocha": "^4.11.0", "eslint-plugin-react": "^7.1.0", "extract-text-webpack-plugin": "^2.1.2", "file-loader": "0.11.2",