From 72235d198fa696579be65decb42dd6b229107a4d Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 20 Jun 2023 17:00:55 +0100 Subject: [PATCH] chore(.eslintrc): enable additional jest plugin rules --- .eslintrc.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 83d26fd..27fd474 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,6 +16,19 @@ module.exports = { extends: ["plugin:jest/recommended", "plugin:jest/style"], files: ["src/**/*.test.js"], plugins: ["jest"], + rules: { + "jest/no-duplicate-hooks": "error", + "jest/no-test-return-statement": "error", + "jest/prefer-comparison-matcher": "error", + "jest/prefer-each": "warn", + "jest/prefer-equality-matcher": "error", + "jest/prefer-expect-resolves": "error", + "jest/prefer-hooks-in-order": "error", + "jest/prefer-hooks-on-top": "error", + "jest/prefer-mock-promise-shorthand": "error", + "jest/prefer-spy-on": "error", + "jest/require-top-level-describe": "error", + }, }, ], parserOptions: {