Commit 2991a97
Upgrade TypeScript to ^6.0.3 (#56772)
Summary:
Pull Request resolved: #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 #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: 9a2feeb257d5783431941a911b17065fcd0389a51 parent e028946 commit 2991a97
8 files changed
Lines changed: 162 additions & 96 deletions
File tree
- packages
- eslint-config-react-native
- react-native
- types
- private/react-native-codegen-typescript-test
- scripts
- build
- js-api/build-types/templates
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
Large diffs are not rendered by default.
0 commit comments