From 9a36872f0c7ba03a92fabf65e4d659d6861ea786 Mon Sep 17 00:00:00 2001 From: Eli White Date: Mon, 8 Jan 2018 13:57:54 -0800 Subject: [PATCH] Use jest eslint plugin to disallow disabled tests Reviewed By: cpojer Differential Revision: D6671502 fbshipit-source-id: 8f1757e5cc2d1a1d8a339aea63dbff7690ae1aff --- .eslintrc | 10 ++++++++-- package.json | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 74249d5da..b561b7a30 100644 --- a/.eslintrc +++ b/.eslintrc @@ -15,7 +15,8 @@ "plugins": [ "flowtype", "prettier", - "react" + "react", + "jest" ], // Map from global var to bool specifying if it can be redefined @@ -245,6 +246,11 @@ "react/prop-types": 0, "react/react-in-jsx-scope": 1, "react/self-closing-comp": 1, - "react/wrap-multilines": 0 + "react/wrap-multilines": 0, + + // Jest Plugin + // The following rules are made available via `eslint-plugin-jest`. + "jest/no-disabled-tests": 1, + "jest/no-focused-tests": 1, } } diff --git a/package.json b/package.json index 16d100054..b34f62747 100644 --- a/package.json +++ b/package.json @@ -206,6 +206,7 @@ "eslint-config-fbjs": "^1.1.1", "eslint-plugin-babel": "^4.1.1", "eslint-plugin-flowtype": "^2.33.0", + "eslint-plugin-jest": "^21.5.0", "eslint-plugin-prettier": "2.1.1", "eslint-plugin-react": "^7.2.1", "flow-bin": "^0.63.0",