Skip to content

Commit 113334b

Browse files
committed
feat(tsconfig): add react-native.json and expo.json configs
- New packages/tsconfig/react-native.json for bare RN projects - New packages/tsconfig/expo.json extending react-native config - Update examples/react-expo to use our expo.json instead of expo/tsconfig.base - Self-contained configs without erasableSyntaxOnly for better IDE compatibility - Fix Biome import ordering in index.tsx
1 parent 96fd04b commit 113334b

File tree

4 files changed

+44
-6
lines changed

4 files changed

+44
-6
lines changed

examples/react-expo/app/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
evoluReactNativeDeps,
77
localAuth,
88
} from "@evolu/react-native/expo-sqlite";
9-
import { Suspense, useEffect, useMemo, useState, type FC } from "react";
9+
import { type FC, Suspense, useEffect, useMemo, useState } from "react";
1010
import {
1111
ActivityIndicator,
1212
ScrollView,

examples/react-expo/tsconfig.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
{
2-
"extends": "expo/tsconfig.base",
2+
"extends": "../../packages/tsconfig/expo.json",
33
"compilerOptions": {
44
"strict": true,
55
"paths": {
6-
"@/*": ["./*"]
6+
"@/*": [
7+
"./*"
8+
]
79
},
8-
"module": "esnext"
10+
"typeRoots": [
11+
"node_modules/@types",
12+
"../../node_modules/@types"
13+
]
914
},
10-
"include": ["**/*.ts", "**/*.tsx", ".expo/types/**/*.ts", "expo-env.d.ts"]
11-
}
15+
"include": [
16+
"**/*.ts",
17+
"**/*.tsx",
18+
".expo/types/**/*.ts",
19+
"expo-env.d.ts"
20+
]
21+
}

packages/tsconfig/expo.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"display": "Expo",
4+
"extends": "./react-native.json",
5+
"compilerOptions": {
6+
"customConditions": ["react-native"],
7+
"moduleDetection": "force"
8+
}
9+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"display": "React Native (bare)",
4+
"compilerOptions": {
5+
"jsx": "react-native",
6+
"lib": ["ES2022"],
7+
"module": "ESNext",
8+
"moduleResolution": "bundler",
9+
"target": "ES2022",
10+
"noEmit": true,
11+
"resolveJsonModule": true,
12+
"allowJs": true,
13+
"esModuleInterop": true,
14+
"strict": true,
15+
"skipLibCheck": true,
16+
"forceConsistentCasingInFileNames": true,
17+
"verbatimModuleSyntax": true
18+
}
19+
}

0 commit comments

Comments
 (0)