mirror of
https://github.com/react/react-native.git
synced 2026-09-28 05:13:06 +08:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56772 Upgrades to TypeScript 6.0.3 and updates `typescript-eslint/*` for TS 6.0 compatibility across `react-native` and `metro`. #### Motivation TypeScript 6.0 (Mar 2026) will resolve https://github.com/facebook/react-native/issues/53565. Before updating in the React Native CLI template, align in RN and Metro source for consistency. This is an internal change since: - This upgrade only applies to TS analysis of these repos' source code. - Edits to `react-native/typescript-config/tsconfig.json` (which *is* distributed) maintain backwards compatibility. #### Changes **react-native** - Bump `typescript` from `^5.8.3` to `^6.0.3` - Bump `typescript-eslint/*` from `^8.24.0` to `^8.59.2` - Replace deprecated `moduleResolution: "node"` with `"node16"` and `target: "es5"` with `"es2015"` in codegen-typescript-test - Add explicit `types: ["jest", "node"]` where needed (TS 6.0 defaults `types` to `[]`) - Set `strict: false` in configs that only enable specific strict flags (TS 6.0 defaults `strict` to `true`) - Update `ModuleResolutionKind.NodeJs` to `Node16` in build config **metro** - Bump `typescript` from `5.8.3` to `^6.0.3` - Bump `typescript-eslint/*` from `^8.36.0` to `^8.59.2` - No tsconfig changes needed (`tsconfig/node20` preset is already TS 6.0 compatible) Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D104658690 fbshipit-source-id: 9a2feeb257d5783431941a911b17065fcd0389a5
21 lines
383 B
JSON
21 lines
383 B
JSON
{
|
|
"compilerOptions": {
|
|
"lib": [
|
|
"es6"
|
|
],
|
|
"module": "node16",
|
|
"moduleResolution": "node16",
|
|
"target": "es2015",
|
|
"types": ["jest", "node"],
|
|
"declaration": false,
|
|
"sourceMap": false,
|
|
"outDir": "./lib",
|
|
"noEmitOnError": true,
|
|
"noUnusedLocals": true,
|
|
"strictNullChecks": true,
|
|
},
|
|
"exclude": [
|
|
"node_modules",
|
|
"lib"
|
|
]
|
|
} |