From 57bca8d616cd2ffa8412bc1743f7b024ee0d5523 Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Thu, 22 Jun 2023 08:48:00 -0700 Subject: [PATCH] Enable `jest/consistent-test-it` rule (as a warning) (#37962) Summary: X-link: https://github.com/facebook/metro/pull/1008 Pull Request resolved: https://github.com/facebook/react-native/pull/37962 Changelog: [Internal] Reviewed By: robhogan, huntie Differential Revision: D46838228 fbshipit-source-id: c0699b852897353fb3c92f8eade256effa4f4696 --- .eslintrc.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6cae9fc20d4125..b952089e371a0e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -18,7 +18,7 @@ module.exports = { extends: ['@react-native'], - plugins: ['@react-native/eslint-plugin-specs', 'lint'], + plugins: ['@react-native/eslint-plugin-specs', 'jest', 'lint'], overrides: [ // overriding the JS config from @react-native/eslint-config to ensure @@ -70,6 +70,12 @@ module.exports = { expect: true, jest: true, }, + rules: { + 'jest/consistent-test-it': [ + 'warn', + {fn: 'test', withinDescribe: 'test'}, + ], + }, }, { files: ['**/__tests__/**/*-test.js'],