From d881c872314e55e17b198a41c86528d79092d222 Mon Sep 17 00:00:00 2001 From: Tim Shamilov Date: Thu, 16 Jun 2022 18:32:37 -0700 Subject: [PATCH] add file and blob globals to eslint config (#31293) Summary: The eslint community config does not have the File and Blob polyfills in `globals` which have been part of the Javascript implementation for ~3 years. They were added to the Javascript API in https://github.com/facebook/react-native/issues/11573 by satya164. ## Changelog [General] [Fixed] - Added File and Blob globals to eslint community config Pull Request resolved: https://github.com/facebook/react-native/pull/31293 Test Plan: Evidence these globals exist: 1. https://github.com/facebook/react-native/issues/11573 2. Executed the following: Screen Shot 2021-04-02 at 12 08 50 PM Screen Shot 2021-04-02 at 12 11 56 PM 3. Receive in console: Screen Shot 2021-04-02 at 12 09 59 PM Screen Shot 2021-04-02 at 12 12 27 PM Evidence the PR works: the globals in the PR identical to the others in the eslint community config that they are in Reviewed By: cipolleschi Differential Revision: D37214364 Pulled By: cortinico fbshipit-source-id: 71b9dec8d222a057c54f6cde6c6d8e85dd25f6f9 --- packages/eslint-config-react-native-community/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/eslint-config-react-native-community/index.js b/packages/eslint-config-react-native-community/index.js index 9df5cce4b42b72..9b16bc97fd0b48 100644 --- a/packages/eslint-config-react-native-community/index.js +++ b/packages/eslint-config-react-native-community/index.js @@ -85,6 +85,7 @@ module.exports = { __dirname: false, __fbBatchedBridgeConfig: false, AbortController: false, + Blob: true, alert: false, cancelAnimationFrame: false, cancelIdleCallback: false, @@ -99,6 +100,7 @@ module.exports = { EventTarget: false, exports: false, fetch: false, + File: true, FileReader: false, FormData: false, global: false,