mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This removes the 4 ineffective and redundant entries from the `exclude` list in `tsconfig.json` (`typescript-config` package). These entries have no effect as they are relative to the typescript-config package. Explained in detail here: https://github.com/tsconfig/bases/issues/207 A newly generated RN app shows this config: ``` $ yarn tsc --showConfig | grep -A 5 exclude "exclude": [ "node_modules/tsconfig/react-native/node_modules", "node_modules/tsconfig/react-native/babel.config.js", "node_modules/tsconfig/react-native/metro.config.js", "node_modules/tsconfig/react-native/jest.config.js" ] ``` Clearly, none of these files exist, therefore to remove ambiguity and reduce the complexity of the config, they should be removed. ## Changelog: [GENERAL] [REMOVED] - Remove ineffective excludes from typescript-config Pull Request resolved: https://github.com/facebook/react-native/pull/42375 Test Plan: - Create new RN app (`npx react-native init`), install dependencies, run `yarn tsc` - It works - Recreate config, but _without_ the `exclude` section - Everything works exactly the same Reviewed By: huntie Differential Revision: D52904713 Pulled By: NickGerleman fbshipit-source-id: d1d6f65b164053f9a1e611022178ced032a38aef
41 lines
1.1 KiB
JSON
41 lines
1.1 KiB
JSON
{
|
|
"$schema": "https://json.schemastore.org/tsconfig",
|
|
"display": "React Native",
|
|
"compilerOptions": {
|
|
"target": "esnext",
|
|
"module": "es2015",
|
|
"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": "bundler",
|
|
"customConditions": ["react-native"],
|
|
"allowImportingTsExtensions": true,
|
|
"allowArbitraryExtensions": true,
|
|
"resolveJsonModule": true,
|
|
"resolvePackageJsonImports": false,
|
|
"allowSyntheticDefaultImports": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
// Causes issues with package.json "exports"
|
|
"forceConsistentCasingInFileNames": false
|
|
}
|
|
}
|