react/scripts/rollup/validate/eslintrc.umd.js
Ricky e0f89aa056
Clean up Scheduler forks (#20915)
* Clean up Scheduler forks

* Un-shadow variables

* Use timer globals directly, add a test for overrides

* Remove more window references

* Don't crash for undefined globals + tests

* Update lint config globals

* Fix test by using async act

* Add test fixture

* Delete test fixture
2021-05-17 16:53:58 -04:00

65 lines
1.3 KiB
JavaScript

'use strict';
module.exports = {
env: {
browser: true,
},
globals: {
// ES6
Map: true,
Set: true,
Symbol: true,
Proxy: true,
WeakMap: true,
WeakSet: true,
Uint16Array: true,
Reflect: true,
// Vendor specific
MSApp: true,
__REACT_DEVTOOLS_GLOBAL_HOOK__: true,
// UMD wrapper code
// TODO: this is too permissive.
// Ideally we should only allow these *inside* the UMD wrapper.
exports: true,
module: true,
define: true,
require: true,
globalThis: true,
global: true,
// Internet Explorer
setImmediate: true,
// Trusted Types
trustedTypes: true,
// Scheduler profiling
Int32Array: true,
ArrayBuffer: true,
TaskController: true,
// Flight
Uint8Array: true,
Promise: true,
// Flight Webpack
__webpack_chunk_load__: true,
__webpack_require__: true,
// jest
jest: true,
},
parserOptions: {
ecmaVersion: 5,
sourceType: 'script',
},
rules: {
'no-undef': 'error',
'no-shadow-restricted-names': 'error',
},
// These plugins aren't used, but eslint complains if an eslint-ignore comment
// references unused plugins. An alternate approach could be to strip
// eslint-ignore comments as part of the build.
plugins: ['jest', 'no-for-of-loops', 'react', 'react-internal'],
};