From c8e26e6ac452d4a2273f628fec449fb9d9d69d47 Mon Sep 17 00:00:00 2001 From: michalchudziak Date: Thu, 21 Mar 2019 08:31:01 -0700 Subject: [PATCH] Fix eslint glob for `.test.js` and `.spec.js` files. (#24088) Summary: Existing glob might not work very well with `spec.js` and `test.js` files unless they're placed in `__tests__` directory. This PR aims to bring back the support of `jest` globals in these files, even if they're outside of `__tests__` directory. [General] [Fixed] - Fixed globs for `spec.js` and `test.js` files. Pull Request resolved: https://github.com/facebook/react-native/pull/24088 Differential Revision: D14562085 Pulled By: cpojer fbshipit-source-id: 543d67e3f8a154256f454b34ccc68bb070197a75 --- packages/eslint-config-react-native-community/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config-react-native-community/index.js b/packages/eslint-config-react-native-community/index.js index 191a7356682..fa55512083a 100644 --- a/packages/eslint-config-react-native-community/index.js +++ b/packages/eslint-config-react-native-community/index.js @@ -31,7 +31,7 @@ module.exports = { }, overrides: { - files: ['**/__tests__/**/*.js', '**/?(*.)(spec|test).js'], + files: ['**/__tests__/**/*.js', '**/*.spec.js', '**/*.test.js'], env: { jest: true, 'jest/globals': true,