From 6839daf86ee7ad1edf61510af2cd22455ecdf6b7 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:18:23 +1000 Subject: [PATCH] docs(examples): Update tsconfig.json for react examples --- examples/react/array/tsconfig.json | 22 ++++++++++++++---- .../react/query-integration/tsconfig.json | 23 +++++++++++++++---- examples/react/simple/tsconfig.json | 22 ++++++++++++++---- examples/react/valibot/tsconfig.json | 23 +++++++++++++++---- examples/react/yup/tsconfig.json | 22 ++++++++++++++---- examples/react/zod/tsconfig.json | 22 ++++++++++++++---- 6 files changed, 108 insertions(+), 26 deletions(-) diff --git a/examples/react/array/tsconfig.json b/examples/react/array/tsconfig.json index 666a0ea71..22b43163b 100644 --- a/examples/react/array/tsconfig.json +++ b/examples/react/array/tsconfig.json @@ -1,9 +1,23 @@ { "compilerOptions": { - "jsx": "react", + "target": "ESNext", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ "strict": true, - "esModuleInterop": true, - "lib": ["DOM", "DOM.Iterable", "ES2020"] - } + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] } diff --git a/examples/react/query-integration/tsconfig.json b/examples/react/query-integration/tsconfig.json index cd9e45528..22b43163b 100644 --- a/examples/react/query-integration/tsconfig.json +++ b/examples/react/query-integration/tsconfig.json @@ -1,10 +1,23 @@ { "compilerOptions": { - "jsx": "react", + "target": "ESNext", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "lib": ["DOM", "DOM.Iterable", "ES2020"] - } + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] } diff --git a/examples/react/simple/tsconfig.json b/examples/react/simple/tsconfig.json index 666a0ea71..22b43163b 100644 --- a/examples/react/simple/tsconfig.json +++ b/examples/react/simple/tsconfig.json @@ -1,9 +1,23 @@ { "compilerOptions": { - "jsx": "react", + "target": "ESNext", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ "strict": true, - "esModuleInterop": true, - "lib": ["DOM", "DOM.Iterable", "ES2020"] - } + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] } diff --git a/examples/react/valibot/tsconfig.json b/examples/react/valibot/tsconfig.json index cd9e45528..22b43163b 100644 --- a/examples/react/valibot/tsconfig.json +++ b/examples/react/valibot/tsconfig.json @@ -1,10 +1,23 @@ { "compilerOptions": { - "jsx": "react", + "target": "ESNext", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "lib": ["DOM", "DOM.Iterable", "ES2020"] - } + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] } diff --git a/examples/react/yup/tsconfig.json b/examples/react/yup/tsconfig.json index 666a0ea71..22b43163b 100644 --- a/examples/react/yup/tsconfig.json +++ b/examples/react/yup/tsconfig.json @@ -1,9 +1,23 @@ { "compilerOptions": { - "jsx": "react", + "target": "ESNext", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ "strict": true, - "esModuleInterop": true, - "lib": ["DOM", "DOM.Iterable", "ES2020"] - } + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] } diff --git a/examples/react/zod/tsconfig.json b/examples/react/zod/tsconfig.json index 666a0ea71..22b43163b 100644 --- a/examples/react/zod/tsconfig.json +++ b/examples/react/zod/tsconfig.json @@ -1,9 +1,23 @@ { "compilerOptions": { - "jsx": "react", + "target": "ESNext", + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ "strict": true, - "esModuleInterop": true, - "lib": ["DOM", "DOM.Iterable", "ES2020"] - } + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] }