From b47dc1df6fca663fe6abd74f311e07e14c02b157 Mon Sep 17 00:00:00 2001 From: David Narbutovich <4661784+retyui@users.noreply.github.com> Date: Mon, 31 Oct 2022 11:35:57 +0100 Subject: [PATCH] Recommend to use `es2019` and use community driven TS config `@tsconfig/react-native` (#3342) --- docs/typescript.md | 24 +++---------------- .../versioned_docs/version-0.69/typescript.md | 23 +++--------------- .../versioned_docs/version-0.70/typescript.md | 24 +++---------------- 3 files changed, 9 insertions(+), 62 deletions(-) diff --git a/docs/typescript.md b/docs/typescript.md index e3e52e66439..b882d9a69ed 100644 --- a/docs/typescript.md +++ b/docs/typescript.md @@ -78,14 +78,14 @@ ignite new MyTSProject ```shell -npm install -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer +npm install -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer @tsconfig/react-native ``` ```shell -yarn add -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer +yarn add -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer @tsconfig/react-native ``` @@ -95,25 +95,7 @@ yarn add -D typescript @types/jest @types/react @types/react-native @types/react ```json { - "compilerOptions": { - "allowJs": true, - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "isolatedModules": true, - "jsx": "react-native", - "lib": ["es2017"], - "types": ["react-native", "jest"], - "moduleResolution": "node", - "noEmit": true, - "strict": true, - "target": "esnext" - }, - "exclude": [ - "node_modules", - "babel.config.js", - "metro.config.js", - "jest.config.js" - ] + "extends": "@tsconfig/react-native/tsconfig.json" } ``` diff --git a/website/versioned_docs/version-0.69/typescript.md b/website/versioned_docs/version-0.69/typescript.md index b62a4a2dc5a..b882d9a69ed 100644 --- a/website/versioned_docs/version-0.69/typescript.md +++ b/website/versioned_docs/version-0.69/typescript.md @@ -78,14 +78,14 @@ ignite new MyTSProject ```shell -npm install -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer +npm install -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer @tsconfig/react-native ``` ```shell -yarn add -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer +yarn add -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer @tsconfig/react-native ``` @@ -95,24 +95,7 @@ yarn add -D typescript @types/jest @types/react @types/react-native @types/react ```json { - "compilerOptions": { - "allowJs": true, - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "isolatedModules": true, - "jsx": "react-native", - "lib": ["es2017"], - "moduleResolution": "node", - "noEmit": true, - "strict": true, - "target": "esnext" - }, - "exclude": [ - "node_modules", - "babel.config.js", - "metro.config.js", - "jest.config.js" - ] + "extends": "@tsconfig/react-native/tsconfig.json" } ``` diff --git a/website/versioned_docs/version-0.70/typescript.md b/website/versioned_docs/version-0.70/typescript.md index e3e52e66439..b882d9a69ed 100644 --- a/website/versioned_docs/version-0.70/typescript.md +++ b/website/versioned_docs/version-0.70/typescript.md @@ -78,14 +78,14 @@ ignite new MyTSProject ```shell -npm install -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer +npm install -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer @tsconfig/react-native ``` ```shell -yarn add -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer +yarn add -D typescript @types/jest @types/react @types/react-native @types/react-test-renderer @tsconfig/react-native ``` @@ -95,25 +95,7 @@ yarn add -D typescript @types/jest @types/react @types/react-native @types/react ```json { - "compilerOptions": { - "allowJs": true, - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "isolatedModules": true, - "jsx": "react-native", - "lib": ["es2017"], - "types": ["react-native", "jest"], - "moduleResolution": "node", - "noEmit": true, - "strict": true, - "target": "esnext" - }, - "exclude": [ - "node_modules", - "babel.config.js", - "metro.config.js", - "jest.config.js" - ] + "extends": "@tsconfig/react-native/tsconfig.json" } ```