1. 'use strict';
    
  2. 
    
  3. module.exports = {
    
  4.   env: {
    
  5.     browser: true,
    
  6.   },
    
  7.   globals: {
    
  8.     // ES6
    
  9.     BigInt: 'readonly',
    
  10.     Map: 'readonly',
    
  11.     Set: 'readonly',
    
  12.     Symbol: 'readonly',
    
  13.     Proxy: 'readonly',
    
  14.     WeakMap: 'readonly',
    
  15.     WeakSet: 'readonly',
    
  16. 
    
  17.     Int8Array: 'readonly',
    
  18.     Uint8Array: 'readonly',
    
  19.     Uint8ClampedArray: 'readonly',
    
  20.     Int16Array: 'readonly',
    
  21.     Uint16Array: 'readonly',
    
  22.     Int32Array: 'readonly',
    
  23.     Uint32Array: 'readonly',
    
  24.     Float32Array: 'readonly',
    
  25.     Float64Array: 'readonly',
    
  26.     BigInt64Array: 'readonly',
    
  27.     BigUint64Array: 'readonly',
    
  28.     DataView: 'readonly',
    
  29.     ArrayBuffer: 'readonly',
    
  30. 
    
  31.     Reflect: 'readonly',
    
  32.     globalThis: 'readonly',
    
  33. 
    
  34.     FinalizationRegistry: 'readonly',
    
  35. 
    
  36.     // Vendor specific
    
  37.     MSApp: 'readonly',
    
  38.     __REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly',
    
  39.     // UMD wrapper code
    
  40.     // TODO: this is too permissive.
    
  41.     // Ideally we should only allow these *inside* the UMD wrapper.
    
  42.     exports: 'readonly',
    
  43.     module: 'readonly',
    
  44.     define: 'readonly',
    
  45.     require: 'readonly',
    
  46.     global: 'readonly',
    
  47.     // Internet Explorer
    
  48.     setImmediate: 'readonly',
    
  49.     // Trusted Types
    
  50.     trustedTypes: 'readonly',
    
  51. 
    
  52.     // Scheduler profiling
    
  53.     TaskController: 'readonly',
    
  54.     reportError: 'readonly',
    
  55.     AggregateError: 'readonly',
    
  56. 
    
  57.     // Flight
    
  58.     Promise: 'readonly',
    
  59. 
    
  60.     // Temp
    
  61.     AsyncLocalStorage: 'readonly',
    
  62. 
    
  63.     // Flight Webpack
    
  64.     __webpack_chunk_load__: 'readonly',
    
  65.     __webpack_require__: 'readonly',
    
  66. 
    
  67.     // Flight Turbopack
    
  68.     __turbopack_load__: 'readonly',
    
  69.     __turbopack_require__: 'readonly',
    
  70. 
    
  71.     // jest
    
  72.     jest: 'readonly',
    
  73. 
    
  74.     // act
    
  75.     IS_REACT_ACT_ENVIRONMENT: 'readonly',
    
  76.   },
    
  77.   parserOptions: {
    
  78.     ecmaVersion: 5,
    
  79.     sourceType: 'script',
    
  80.   },
    
  81.   rules: {
    
  82.     'no-undef': 'error',
    
  83.     'no-shadow-restricted-names': 'error',
    
  84.   },
    
  85. 
    
  86.   // These plugins aren't used, but eslint complains if an eslint-ignore comment
    
  87.   // references unused plugins. An alternate approach could be to strip
    
  88.   // eslint-ignore comments as part of the build.
    
  89.   plugins: ['ft-flow', 'jest', 'no-for-of-loops', 'react', 'react-internal'],
    
  90. };