Add mocha/no-exclusive-tests eslint rule
authorFrank Bessou <frank.bessou@logilab.fr>
Fri, 30 Jun 2017 11:03:11 +0200
changeset 236 9e5eb5c240ca
parent 235 5f915cb3dc34
child 237 dd1cf7e02866
Add mocha/no-exclusive-tests eslint rule This rule produces an error when using one of "describe/context/it.only". These functions allows to run only a specified test suite/case. It can be useful when working on a feature but it should not be commited.
.eslintrc.yml
package.json
--- a/.eslintrc.yml	Fri Jun 30 10:24:04 2017 +0200
+++ b/.eslintrc.yml	Fri Jun 30 11:03:11 2017 +0200
@@ -28,6 +28,7 @@
   import/newline-after-import: "error"
   indent: ["error", 4, {"VariableDeclarator": 1, 'SwitchCase': 1}]
   key-spacing: ["error"]
+  mocha/no-exclusive-tests: ["error"]
   new-cap: [0]
   no-console: ["error", {"allow": ["warn", "error"]}]
   no-multiple-empty-lines: ["error", {"max":1, "maxEOF": 0, "maxBOF": 0}]
@@ -51,3 +52,4 @@
 plugins:
   - react
   - import
+  - mocha
--- a/package.json	Fri Jun 30 10:24:04 2017 +0200
+++ b/package.json	Fri Jun 30 11:03:11 2017 +0200
@@ -28,6 +28,7 @@
     "enzyme": "^2.8.2",
     "eslint": "^4.0.0",
     "eslint-plugin-import": "^2.2.0",
+    "eslint-plugin-mocha": "^4.11.0",
     "eslint-plugin-react": "^6.7.1",
     "html-webpack-plugin": "^2.28.0",
     "http-link-header": "^0.8.0",