harden ts configs

This commit is contained in:
EthanShoeDev
2025-09-10 00:34:06 -04:00
parent 002f8bde8d
commit 19e0348978
3 changed files with 75 additions and 62 deletions

65
apps/mobile/app.config.ts Normal file
View File

@@ -0,0 +1,65 @@
import 'tsx/cjs'; // Add this to import TypeScript files
import { type ExpoConfig } from 'expo/config';
import packageJson from './package.json';
const config: ExpoConfig = {
name: 'fressh',
slug: 'fressh',
version: packageJson.version,
orientation: 'portrait',
icon: './assets/images/icon.png',
scheme: 'fressh',
userInterfaceStyle: 'automatic',
newArchEnabled: true,
ios: {
supportsTablet: true,
config: {
usesNonExemptEncryption: false,
},
bundleIdentifier: 'dev.fressh.app',
},
android: {
package: 'dev.fressh.app',
adaptiveIcon: {
foregroundImage: './assets/images/adaptive-icon.png',
backgroundColor: '#ffffff',
},
edgeToEdgeEnabled: true,
predictiveBackGestureEnabled: false,
},
web: {
output: 'static',
favicon: './assets/images/favicon.png',
},
plugins: [
'expo-router',
[
'expo-splash-screen',
{
image: './assets/images/splash-icon.png',
imageWidth: 200,
resizeMode: 'contain',
backgroundColor: '#ffffff',
},
],
'expo-secure-store',
'expo-font',
'expo-web-browser',
[
'expo-build-properties',
{
android: {
packagingOptions: {
pickFirst: ['META-INF/versions/9/OSGI-INF/MANIFEST.MF'],
},
},
},
],
],
experiments: {
typedRoutes: true,
reactCompiler: true,
},
};
export default config;

View File

@@ -1,61 +0,0 @@
{
"expo": {
"name": "fressh",
"slug": "fressh",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "fressh",
"userInterfaceStyle": "automatic",
"newArchEnabled": true,
"ios": {
"supportsTablet": true,
"config": {
"usesNonExemptEncryption": false
},
"bundleIdentifier": "dev.fressh.app"
},
"android": {
"package": "dev.fressh.app",
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"edgeToEdgeEnabled": true,
"predictiveBackGestureEnabled": false
},
"web": {
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": [
"expo-router",
[
"expo-splash-screen",
{
"image": "./assets/images/splash-icon.png",
"imageWidth": 200,
"resizeMode": "contain",
"backgroundColor": "#ffffff"
}
],
"expo-secure-store",
"expo-font",
"expo-web-browser",
[
"expo-build-properties",
{
"android": {
"packagingOptions": {
"pickFirst": ["META-INF/versions/9/OSGI-INF/MANIFEST.MF"]
}
}
}
]
],
"experiments": {
"typedRoutes": true,
"reactCompiler": true
}
}
}

View File

@@ -2,8 +2,17 @@
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"verbatimModuleSyntax": true,
"noImplicitOverride": true,
"allowJs": true,
"strictNullChecks": true,
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
"@/*": ["src/*"]
}
},
"include": [