Skip to content

Commit

Permalink
Add globalThis to ESLint configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Feb 23, 2021
1 parent 3fb5432 commit 0182034
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ module.exports = {

globals: {
SharedArrayBuffer: true,
globalThis: true,

spyOnDev: true,
spyOnDevAndProd: true,
Expand Down
1 change: 0 additions & 1 deletion packages/scheduler/src/forks/SchedulerDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ var isHostTimeoutScheduled = false;
// Web Workers can't access window.
// Many browsers provide a globalThis property for this reason.
// For legacy reasons (mostly unit tests) this code prefers window if defined.
// eslint-disable-next-line no-undef
const globalObject = typeof window !== 'undefined' ? window : globalThis;

// Capture local references to native APIs, in case a polyfill overrides them.
Expand Down
1 change: 1 addition & 0 deletions scripts/rollup/validate/eslintrc.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports = {
SharedArrayBuffer: true,
Int32Array: true,
ArrayBuffer: true,
globalThis: true,

TaskController: true,

Expand Down
1 change: 1 addition & 0 deletions scripts/rollup/validate/eslintrc.cjs2015.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports = {
SharedArrayBuffer: true,
Int32Array: true,
ArrayBuffer: true,
globalThis: true,

TaskController: true,

Expand Down
1 change: 1 addition & 0 deletions scripts/rollup/validate/eslintrc.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports = {
SharedArrayBuffer: true,
Int32Array: true,
ArrayBuffer: true,
globalThis: true,

TaskController: true,

Expand Down
1 change: 1 addition & 0 deletions scripts/rollup/validate/eslintrc.fb.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
SharedArrayBuffer: true,
Int32Array: true,
ArrayBuffer: true,
globalThis: true,

TaskController: true,

Expand Down
1 change: 1 addition & 0 deletions scripts/rollup/validate/eslintrc.rn.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports = {
SharedArrayBuffer: true,
Int32Array: true,
ArrayBuffer: true,
globalThis: true,

TaskController: true,

Expand Down

0 comments on commit 0182034

Please sign in to comment.