-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows exporting ESM modules for the Webpack plugin. This is necessary for making a resolver plugin. We could probably make the whole plugin use ESM instead of CJS ES2015.
- Loading branch information
1 parent
1b96ee4
commit 504222d
Showing
6 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
env: { | ||
commonjs: true, | ||
browser: true, | ||
}, | ||
globals: { | ||
// ES 6 | ||
Map: true, | ||
Set: true, | ||
Proxy: true, | ||
Symbol: true, | ||
WeakMap: true, | ||
WeakSet: true, | ||
Uint16Array: true, | ||
Reflect: true, | ||
// Vendor specific | ||
MSApp: true, | ||
__REACT_DEVTOOLS_GLOBAL_HOOK__: true, | ||
// CommonJS / Node | ||
process: true, | ||
setImmediate: true, | ||
Buffer: true, | ||
// Trusted Types | ||
trustedTypes: true, | ||
|
||
// Scheduler profiling | ||
SharedArrayBuffer: true, | ||
Int32Array: true, | ||
ArrayBuffer: true, | ||
|
||
TaskController: true, | ||
|
||
// Flight | ||
Uint8Array: true, | ||
Promise: true, | ||
|
||
// Flight Webpack | ||
__webpack_chunk_load__: true, | ||
__webpack_require__: true, | ||
|
||
// jest | ||
expect: true, | ||
jest: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2015, | ||
sourceType: 'module', | ||
}, | ||
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'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters