-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add @react-native/typescript-config (#37345)
Summary: Pull Request resolved: #37345 This moves from `tsconfig/react-native`, a centralized repository of tsconfigs, to `react-native/typescript-config`, a package maintained as part of the RN monorepo. We end up wanting to make changes where the versions are coupled, so this publishes them as part of the same repo, etc. It also means Meta engineers can more freely make changes to it with normal approval processes. Changelog: [General][Added] - Add react-native/typescript-config Reviewed By: cortinico Differential Revision: D45721088 fbshipit-source-id: e0c40782cf8b733c974c160f70194c14ce7e6b96
- Loading branch information
1 parent
7ea3950
commit 315a24f
Showing
5 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": "@tsconfig/react-native/tsconfig.json" | ||
"extends": "@react-native/typescript-config/tsconfig.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# @react-native/typescript-config | ||
|
||
This package provides the default `tsconfig.json` used by newly built React Native apps. | ||
|
||
This template is customized for specific versions of React Native, and should be updated in sync with the rest of your app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "@react-native/typescript-config", | ||
"version": "0.73.0", | ||
"description": "Default TypeScript configuration for React Native apps", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/facebook/react-native.git", | ||
"directory": "packages/typescript-config" | ||
}, | ||
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/typescript-config#readme", | ||
"keywords": ["typescript", "tsconfig", "react-native"], | ||
"bugs": "https://github.com/facebook/react-native/issues", | ||
"main": "tsconfig.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/tsconfig", | ||
"display": "React Native", | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "commonjs", | ||
"types": ["react-native", "jest"], | ||
"lib": [ | ||
"es2019", | ||
"es2020.bigint", | ||
"es2020.date", | ||
"es2020.number", | ||
"es2020.promise", | ||
"es2020.string", | ||
"es2020.symbol.wellknown", | ||
"es2021.promise", | ||
"es2021.string", | ||
"es2021.weakref", | ||
"es2022.array", | ||
"es2022.object", | ||
"es2022.string" | ||
], | ||
"allowJs": true, | ||
"jsx": "react-native", | ||
"noEmit": true, | ||
"isolatedModules": true, | ||
"strict": true, | ||
"moduleResolution": "nodenext", | ||
"resolveJsonModule": true, | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
// Causes issues with package.json "exports" | ||
"forceConsistentCasingInFileNames": false | ||
}, | ||
"exclude": [ | ||
"node_modules", | ||
"babel.config.js", | ||
"metro.config.js", | ||
"jest.config.js" | ||
] | ||
} |