2017-11-02 23:50:25 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
env: {
|
|
|
|
|
commonjs: true,
|
|
|
|
|
browser: true,
|
|
|
|
|
},
|
|
|
|
|
globals: {
|
|
|
|
|
// ES6
|
2021-11-24 06:53:26 +08:00
|
|
|
Map: 'readonly',
|
|
|
|
|
Set: 'readonly',
|
|
|
|
|
Symbol: 'readonly',
|
|
|
|
|
Proxy: 'readonly',
|
|
|
|
|
WeakMap: 'readonly',
|
|
|
|
|
WeakSet: 'readonly',
|
|
|
|
|
Uint16Array: 'readonly',
|
|
|
|
|
Reflect: 'readonly',
|
2017-11-02 23:50:25 +08:00
|
|
|
// Vendor specific
|
2021-11-24 06:53:26 +08:00
|
|
|
MSApp: 'readonly',
|
|
|
|
|
__REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly',
|
2017-11-02 23:50:25 +08:00
|
|
|
// FB
|
2021-11-24 06:53:26 +08:00
|
|
|
__DEV__: 'readonly',
|
2018-12-01 03:38:22 +08:00
|
|
|
// Node.js Server Rendering
|
2021-11-24 06:53:26 +08:00
|
|
|
setImmediate: 'readonly',
|
|
|
|
|
Buffer: 'readonly',
|
2019-09-16 20:43:22 +08:00
|
|
|
// Trusted Types
|
2021-11-24 06:53:26 +08:00
|
|
|
trustedTypes: 'readonly',
|
2019-08-23 04:58:12 +08:00
|
|
|
|
|
|
|
|
// Scheduler profiling
|
2021-11-24 06:53:26 +08:00
|
|
|
Int32Array: 'readonly',
|
|
|
|
|
ArrayBuffer: 'readonly',
|
2019-11-02 07:05:07 +08:00
|
|
|
|
2021-11-24 06:53:26 +08:00
|
|
|
TaskController: 'readonly',
|
2020-08-12 21:39:47 +08:00
|
|
|
|
2019-11-02 07:05:07 +08:00
|
|
|
// Flight
|
2021-11-24 06:53:26 +08:00
|
|
|
Uint8Array: 'readonly',
|
|
|
|
|
Promise: 'readonly',
|
2020-09-09 12:55:23 +08:00
|
|
|
|
|
|
|
|
// jest
|
2021-11-24 06:53:26 +08:00
|
|
|
jest: 'readonly',
|
2021-10-18 23:27:26 +08:00
|
|
|
|
|
|
|
|
// act
|
2021-11-24 06:53:26 +08:00
|
|
|
IS_REACT_ACT_ENVIRONMENT: 'readonly',
|
2017-11-02 23:50:25 +08:00
|
|
|
},
|
|
|
|
|
parserOptions: {
|
|
|
|
|
ecmaVersion: 5,
|
|
|
|
|
sourceType: 'script',
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
'no-undef': 'error',
|
|
|
|
|
'no-shadow-restricted-names': 'error',
|
|
|
|
|
},
|
2019-08-10 03:59:02 +08:00
|
|
|
|
|
|
|
|
// 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'],
|
2017-11-02 23:50:25 +08:00
|
|
|
};
|