mirror of
https://github.com/react/react-native.git
synced 2026-09-28 13:23:09 +08:00
Upgrade TypeScript to ^6.0.3 (#56772)
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
This commit is contained in:
committed by
meta-codesync[bot]
parent
e028946658
commit
2991a97731
@@ -2,6 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"module": "esnext",
|
||||
"lib": ["es2020"],
|
||||
"strict": false,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"types": [],
|
||||
|
||||
Reference in New Issue
Block a user