GeezerVison is showing github.com — Update deprecated features in ESLint configuration files. (#22767) · react/react@09d9b17
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .eslintrc.js +17-20Lines changed: 17 additions & 20 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -26,11 +26,8 @@ module.exports = { | 26 | 26 |
| 27 | 27 | parser: 'babel-eslint', | 28 | 28 | parserOptions: { | 29 | | - ecmaVersion: 8, | | 29 | + ecmaVersion: 9, | 30 | 30 | sourceType: 'script', | 31 | | - ecmaFeatures: { | 32 | | - experimentalObjectRestSpread: true, | 33 | | - }, | 34 | 31 | }, | 35 | 32 |
| 36 | 33 | // We're stricter than the default config, mostly. We'll override a few rules | @@ -248,36 +245,36 @@ module.exports = { | 248 | 245 | 'packages/react-server-native-relay/**/*.js', | 249 | 246 | ], | 250 | 247 | globals: { | 251 | | - nativeFabricUIManager: true, | | 248 | + nativeFabricUIManager: 'readonly', | 252 | 249 | }, | 253 | 250 | }, | 254 | 251 | { | 255 | 252 | files: ['packages/react-server-dom-webpack/**/*.js'], | 256 | 253 | globals: { | 257 | | - __webpack_chunk_load__: true, | 258 | | - __webpack_require__: true, | | 254 | + __webpack_chunk_load__: 'readonly', | | 255 | + __webpack_require__: 'readonly', | 259 | 256 | }, | 260 | 257 | }, | 261 | 258 | { | 262 | 259 | files: ['packages/scheduler/**/*.js'], | 263 | 260 | globals: { | 264 | | - TaskController: true, | | 261 | + TaskController: 'readonly', | 265 | 262 | }, | 266 | 263 | }, | 267 | 264 | ], | 268 | 265 |
| 269 | 266 | globals: { | 270 | | - spyOnDev: true, | 271 | | - spyOnDevAndProd: true, | 272 | | - spyOnProd: true, | 273 | | - __EXPERIMENTAL__: true, | 274 | | - __EXTENSION__: true, | 275 | | - __PROFILE__: true, | 276 | | - __TEST__: true, | 277 | | - __UMD__: true, | 278 | | - __VARIANT__: true, | 279 | | - gate: true, | 280 | | - trustedTypes: true, | 281 | | - IS_REACT_ACT_ENVIRONMENT: true, | | 267 | + spyOnDev: 'readonly', | | 268 | + spyOnDevAndProd: 'readonly', | | 269 | + spyOnProd: 'readonly', | | 270 | + __EXPERIMENTAL__: 'readonly', | | 271 | + __EXTENSION__: 'readonly', | | 272 | + __PROFILE__: 'readonly', | | 273 | + __TEST__: 'readonly', | | 274 | + __UMD__: 'readonly', | | 275 | + __VARIANT__: 'readonly', | | 276 | + gate: 'readonly', | | 277 | + trustedTypes: 'readonly', | | 278 | + IS_REACT_ACT_ENVIRONMENT: 'readonly', | 282 | 279 | }, | 283 | 280 | }; |
Collapse file Copy file name to clipboardExpand all lines: scripts/rollup/validate/eslintrc.cjs.js +25-25Lines changed: 25 additions & 25 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,45 +7,45 @@ module.exports = { | 7 | 7 | }, | 8 | 8 | globals: { | 9 | 9 | // ES 6 | 10 | | - Map: true, | 11 | | - Set: true, | 12 | | - Proxy: true, | 13 | | - Symbol: true, | 14 | | - WeakMap: true, | 15 | | - WeakSet: true, | 16 | | - Uint16Array: true, | 17 | | - Reflect: true, | 18 | | - globalThis: true, | | 10 | + Map: 'readonly', | | 11 | + Set: 'readonly', | | 12 | + Proxy: 'readonly', | | 13 | + Symbol: 'readonly', | | 14 | + WeakMap: 'readonly', | | 15 | + WeakSet: 'readonly', | | 16 | + Uint16Array: 'readonly', | | 17 | + Reflect: 'readonly', | | 18 | + globalThis: 'readonly', | 19 | 19 | // Vendor specific | 20 | | - MSApp: true, | 21 | | - __REACT_DEVTOOLS_GLOBAL_HOOK__: true, | | 20 | + MSApp: 'readonly', | | 21 | + __REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly', | 22 | 22 | // CommonJS / Node | 23 | | - process: true, | 24 | | - setImmediate: true, | 25 | | - Buffer: true, | | 23 | + process: 'readonly', | | 24 | + setImmediate: 'readonly', | | 25 | + Buffer: 'readonly', | 26 | 26 | // Trusted Types | 27 | | - trustedTypes: true, | | 27 | + trustedTypes: 'readonly', | 28 | 28 |
| 29 | 29 | // Scheduler profiling | 30 | | - Int32Array: true, | 31 | | - ArrayBuffer: true, | | 30 | + Int32Array: 'readonly', | | 31 | + ArrayBuffer: 'readonly', | 32 | 32 |
| 33 | | - TaskController: true, | | 33 | + TaskController: 'readonly', | 34 | 34 |
| 35 | 35 | // Flight | 36 | | - Uint8Array: true, | 37 | | - Promise: true, | | 36 | + Uint8Array: 'readonly', | | 37 | + Promise: 'readonly', | 38 | 38 |
| 39 | 39 | // Flight Webpack | 40 | | - __webpack_chunk_load__: true, | 41 | | - __webpack_require__: true, | | 40 | + __webpack_chunk_load__: 'readonly', | | 41 | + __webpack_require__: 'readonly', | 42 | 42 |
| 43 | 43 | // jest | 44 | | - expect: true, | 45 | | - jest: true, | | 44 | + expect: 'readonly', | | 45 | + jest: 'readonly', | 46 | 46 |
| 47 | 47 | // act | 48 | | - IS_REACT_ACT_ENVIRONMENT: true, | | 48 | + IS_REACT_ACT_ENVIRONMENT: 'readonly', | 49 | 49 | }, | 50 | 50 | parserOptions: { | 51 | 51 | ecmaVersion: 5, | |
Collapse file Copy file name to clipboardExpand all lines: scripts/rollup/validate/eslintrc.cjs2015.js +24-24Lines changed: 24 additions & 24 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,44 +7,44 @@ module.exports = { | 7 | 7 | }, | 8 | 8 | globals: { | 9 | 9 | // ES 6 | 10 | | - Map: true, | 11 | | - Set: true, | 12 | | - Proxy: true, | 13 | | - Symbol: true, | 14 | | - WeakMap: true, | 15 | | - WeakSet: true, | 16 | | - Uint16Array: true, | 17 | | - Reflect: true, | | 10 | + Map: 'readonly', | | 11 | + Set: 'readonly', | | 12 | + Proxy: 'readonly', | | 13 | + Symbol: 'readonly', | | 14 | + WeakMap: 'readonly', | | 15 | + WeakSet: 'readonly', | | 16 | + Uint16Array: 'readonly', | | 17 | + Reflect: 'readonly', | 18 | 18 | // Vendor specific | 19 | | - MSApp: true, | 20 | | - __REACT_DEVTOOLS_GLOBAL_HOOK__: true, | | 19 | + MSApp: 'readonly', | | 20 | + __REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly', | 21 | 21 | // CommonJS / Node | 22 | | - process: true, | 23 | | - setImmediate: true, | 24 | | - Buffer: true, | | 22 | + process: 'readonly', | | 23 | + setImmediate: 'readonly', | | 24 | + Buffer: 'readonly', | 25 | 25 | // Trusted Types | 26 | | - trustedTypes: true, | | 26 | + trustedTypes: 'readonly', | 27 | 27 |
| 28 | 28 | // Scheduler profiling | 29 | | - Int32Array: true, | 30 | | - ArrayBuffer: true, | | 29 | + Int32Array: 'readonly', | | 30 | + ArrayBuffer: 'readonly', | 31 | 31 |
| 32 | | - TaskController: true, | | 32 | + TaskController: 'readonly', | 33 | 33 |
| 34 | 34 | // Flight | 35 | | - Uint8Array: true, | 36 | | - Promise: true, | | 35 | + Uint8Array: 'readonly', | | 36 | + Promise: 'readonly', | 37 | 37 |
| 38 | 38 | // Flight Webpack | 39 | | - __webpack_chunk_load__: true, | 40 | | - __webpack_require__: true, | | 39 | + __webpack_chunk_load__: 'readonly', | | 40 | + __webpack_require__: 'readonly', | 41 | 41 |
| 42 | 42 | // jest | 43 | | - expect: true, | 44 | | - jest: true, | | 43 | + expect: 'readonly', | | 44 | + jest: 'readonly', | 45 | 45 |
| 46 | 46 | // act | 47 | | - IS_REACT_ACT_ENVIRONMENT: true, | | 47 | + IS_REACT_ACT_ENVIRONMENT: 'readonly', | 48 | 48 | }, | 49 | 49 | parserOptions: { | 50 | 50 | ecmaVersion: 2015, | |
Collapse file Copy file name to clipboardExpand all lines: scripts/rollup/validate/eslintrc.esm.js +24-24Lines changed: 24 additions & 24 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,44 +7,44 @@ module.exports = { | 7 | 7 | }, | 8 | 8 | globals: { | 9 | 9 | // ES 6 | 10 | | - Map: true, | 11 | | - Set: true, | 12 | | - Proxy: true, | 13 | | - Symbol: true, | 14 | | - WeakMap: true, | 15 | | - WeakSet: true, | 16 | | - Uint16Array: true, | 17 | | - Reflect: true, | | 10 | + Map: 'readonly', | | 11 | + Set: 'readonly', | | 12 | + Proxy: 'readonly', | | 13 | + Symbol: 'readonly', | | 14 | + WeakMap: 'readonly', | | 15 | + WeakSet: 'readonly', | | 16 | + Uint16Array: 'readonly', | | 17 | + Reflect: 'readonly', | 18 | 18 | // Vendor specific | 19 | | - MSApp: true, | 20 | | - __REACT_DEVTOOLS_GLOBAL_HOOK__: true, | | 19 | + MSApp: 'readonly', | | 20 | + __REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly', | 21 | 21 | // CommonJS / Node | 22 | | - process: true, | 23 | | - setImmediate: true, | 24 | | - Buffer: true, | | 22 | + process: 'readonly', | | 23 | + setImmediate: 'readonly', | | 24 | + Buffer: 'readonly', | 25 | 25 | // Trusted Types | 26 | | - trustedTypes: true, | | 26 | + trustedTypes: 'readonly', | 27 | 27 |
| 28 | 28 | // Scheduler profiling | 29 | | - Int32Array: true, | 30 | | - ArrayBuffer: true, | | 29 | + Int32Array: 'readonly', | | 30 | + ArrayBuffer: 'readonly', | 31 | 31 |
| 32 | | - TaskController: true, | | 32 | + TaskController: 'readonly', | 33 | 33 |
| 34 | 34 | // Flight | 35 | | - Uint8Array: true, | 36 | | - Promise: true, | | 35 | + Uint8Array: 'readonly', | | 36 | + Promise: 'readonly', | 37 | 37 |
| 38 | 38 | // Flight Webpack | 39 | | - __webpack_chunk_load__: true, | 40 | | - __webpack_require__: true, | | 39 | + __webpack_chunk_load__: 'readonly', | | 40 | + __webpack_require__: 'readonly', | 41 | 41 |
| 42 | 42 | // jest | 43 | | - expect: true, | 44 | | - jest: true, | | 43 | + expect: 'readonly', | | 44 | + jest: 'readonly', | 45 | 45 |
| 46 | 46 | // act | 47 | | - IS_REACT_ACT_ENVIRONMENT: true, | | 47 | + IS_REACT_ACT_ENVIRONMENT: 'readonly', | 48 | 48 | }, | 49 | 49 | parserOptions: { | 50 | 50 | ecmaVersion: 2017, | |
Collapse file Copy file name to clipboardExpand all lines: scripts/rollup/validate/eslintrc.fb.js +21-21Lines changed: 21 additions & 21 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,40 +7,40 @@ module.exports = { | 7 | 7 | }, | 8 | 8 | globals: { | 9 | 9 | // ES6 | 10 | | - Map: true, | 11 | | - Set: true, | 12 | | - Symbol: true, | 13 | | - Proxy: true, | 14 | | - WeakMap: true, | 15 | | - WeakSet: true, | 16 | | - Uint16Array: true, | 17 | | - Reflect: true, | | 10 | + Map: 'readonly', | | 11 | + Set: 'readonly', | | 12 | + Symbol: 'readonly', | | 13 | + Proxy: 'readonly', | | 14 | + WeakMap: 'readonly', | | 15 | + WeakSet: 'readonly', | | 16 | + Uint16Array: 'readonly', | | 17 | + Reflect: 'readonly', | 18 | 18 | // Vendor specific | 19 | | - MSApp: true, | 20 | | - __REACT_DEVTOOLS_GLOBAL_HOOK__: true, | | 19 | + MSApp: 'readonly', | | 20 | + __REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly', | 21 | 21 | // FB | 22 | | - __DEV__: true, | | 22 | + __DEV__: 'readonly', | 23 | 23 | // Node.js Server Rendering | 24 | | - setImmediate: true, | 25 | | - Buffer: true, | | 24 | + setImmediate: 'readonly', | | 25 | + Buffer: 'readonly', | 26 | 26 | // Trusted Types | 27 | | - trustedTypes: true, | | 27 | + trustedTypes: 'readonly', | 28 | 28 |
| 29 | 29 | // Scheduler profiling | 30 | | - Int32Array: true, | 31 | | - ArrayBuffer: true, | | 30 | + Int32Array: 'readonly', | | 31 | + ArrayBuffer: 'readonly', | 32 | 32 |
| 33 | | - TaskController: true, | | 33 | + TaskController: 'readonly', | 34 | 34 |
| 35 | 35 | // Flight | 36 | | - Uint8Array: true, | 37 | | - Promise: true, | | 36 | + Uint8Array: 'readonly', | | 37 | + Promise: 'readonly', | 38 | 38 |
| 39 | 39 | // jest | 40 | | - jest: true, | | 40 | + jest: 'readonly', | 41 | 41 |
| 42 | 42 | // act | 43 | | - IS_REACT_ACT_ENVIRONMENT: true, | | 43 | + IS_REACT_ACT_ENVIRONMENT: 'readonly', | 44 | 44 | }, | 45 | 45 | parserOptions: { | 46 | 46 | ecmaVersion: 5, | |
Collapse file Copy file name to clipboardExpand all lines: scripts/rollup/validate/eslintrc.rn.js +18-18Lines changed: 18 additions & 18 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,36 +7,36 @@ module.exports = { | 7 | 7 | }, | 8 | 8 | globals: { | 9 | 9 | // ES6 | 10 | | - Map: true, | 11 | | - Set: true, | 12 | | - Symbol: true, | 13 | | - Proxy: true, | 14 | | - WeakMap: true, | 15 | | - WeakSet: true, | 16 | | - Reflect: true, | | 10 | + Map: 'readonly', | | 11 | + Set: 'readonly', | | 12 | + Symbol: 'readonly', | | 13 | + Proxy: 'readonly', | | 14 | + WeakMap: 'readonly', | | 15 | + WeakSet: 'readonly', | | 16 | + Reflect: 'readonly', | 17 | 17 | // Vendor specific | 18 | | - MSApp: true, | 19 | | - __REACT_DEVTOOLS_GLOBAL_HOOK__: true, | | 18 | + MSApp: 'readonly', | | 19 | + __REACT_DEVTOOLS_GLOBAL_HOOK__: 'readonly', | 20 | 20 | // FB | 21 | | - __DEV__: true, | | 21 | + __DEV__: 'readonly', | 22 | 22 | // Fabric. See https://github.com/facebook/react/pull/15490 | 23 | 23 | // for more information | 24 | | - nativeFabricUIManager: true, | | 24 | + nativeFabricUIManager: 'readonly', | 25 | 25 | // Trusted Types | 26 | | - trustedTypes: true, | | 26 | + trustedTypes: 'readonly', | 27 | 27 | // RN supports this | 28 | | - setImmediate: true, | | 28 | + setImmediate: 'readonly', | 29 | 29 | // Scheduler profiling | 30 | | - Int32Array: true, | 31 | | - ArrayBuffer: true, | | 30 | + Int32Array: 'readonly', | | 31 | + ArrayBuffer: 'readonly', | 32 | 32 |
| 33 | | - TaskController: true, | | 33 | + TaskController: 'readonly', | 34 | 34 |
| 35 | 35 | // jest | 36 | | - jest: true, | | 36 | + jest: 'readonly', | 37 | 37 |
| 38 | 38 | // act | 39 | | - IS_REACT_ACT_ENVIRONMENT: true, | | 39 | + IS_REACT_ACT_ENVIRONMENT: 'readonly', | 40 | 40 | }, | 41 | 41 | parserOptions: { | 42 | 42 | ecmaVersion: 5, | |
|