Skip to content

Commit

Permalink
add file and blob globals to eslint config (#31293)
Browse files Browse the repository at this point in the history
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 #11573 by satya164.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Fixed] - Added File and Blob globals to eslint community config

Pull Request resolved: #31293

Test Plan:
Evidence these globals exist:
1. #11573
2. Executed the following:
<img width="421" alt="Screen Shot 2021-04-02 at 12 08 50 PM" src="https://user-images.githubusercontent.com/3495974/113432946-466ae280-93ac-11eb-899c-3ca124e0af84.png">
<img width="317" alt="Screen Shot 2021-04-02 at 12 11 56 PM" src="https://user-images.githubusercontent.com/3495974/113433156-a82b4c80-93ac-11eb-99dc-0840d5ad9078.png">

3. Receive in console:
<img width="603" alt="Screen Shot 2021-04-02 at 12 09 59 PM" src="https://user-images.githubusercontent.com/3495974/113432996-5da9d000-93ac-11eb-81c6-88e6b059c733.png">
<img width="599" alt="Screen Shot 2021-04-02 at 12 12 27 PM" src="https://user-images.githubusercontent.com/3495974/113433174-b711ff00-93ac-11eb-8820-67039696f6ce.png">

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
  • Loading branch information
shamilovtim authored and facebook-github-bot committed Jun 17, 2022
1 parent 83f13e1 commit d881c87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/eslint-config-react-native-community/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ module.exports = {
__dirname: false,
__fbBatchedBridgeConfig: false,
AbortController: false,
Blob: true,
alert: false,
cancelAnimationFrame: false,
cancelIdleCallback: false,
Expand All @@ -99,6 +100,7 @@ module.exports = {
EventTarget: false,
exports: false,
fetch: false,
File: true,
FileReader: false,
FormData: false,
global: false,
Expand Down

0 comments on commit d881c87

Please sign in to comment.