diff --git a/js/mobile/app.config.ts b/js/mobile/app.config.ts index 92b5d6c..16403ec 100644 --- a/js/mobile/app.config.ts +++ b/js/mobile/app.config.ts @@ -1,80 +1,79 @@ -import type { ExpoConfig } from "expo/config"; +import type { ExpoConfig } from 'expo/config'; -const APP_ENV = (process.env.EXPO_PUBLIC_APP_ENV ?? "dev") as "dev" | "prod"; +const APP_ENV = (process.env.EXPO_PUBLIC_APP_ENV ?? 'dev') as 'dev' | 'prod'; const config: ExpoConfig = { - name: "Flowy", - slug: "flowy", - version: "0.1.0", - orientation: "portrait", - icon: "./assets/icon.png", - scheme: "flowy", - userInterfaceStyle: "dark", + name: 'Flowy', + slug: 'flowy', + version: '0.1.0', + orientation: 'portrait', + icon: './assets/icon.png', + scheme: 'flowy', + userInterfaceStyle: 'dark', newArchEnabled: true, splash: { - image: "./assets/icon.png", - resizeMode: "contain", - backgroundColor: "#2B2B2B", + image: './assets/icon.png', + resizeMode: 'contain', + backgroundColor: '#2B2B2B', }, ios: { supportsTablet: true, - bundleIdentifier: "ai.flowylabs.llink", + bundleIdentifier: 'ai.flowylabs.llink', infoPlist: { ITSAppUsesNonExemptEncryption: false, }, }, android: { adaptiveIcon: { - foregroundImage: "./assets/icon.png", - backgroundColor: "#2B2B2B", + foregroundImage: './assets/icon.png', + backgroundColor: '#2B2B2B', }, }, plugins: [ [ - "expo-build-properties", + 'expo-build-properties', { ios: { - deploymentTarget: "16.0", + deploymentTarget: '16.0', }, }, ], - "expo-secure-store", + 'expo-secure-store', [ - "expo-camera", + 'expo-camera', { - cameraPermission: - "Flowy uses your camera to record video messages.", + cameraPermission: 'Flowy uses your camera to record video messages.', microphonePermission: - "Flowy uses your microphone to record voice and video messages.", + 'Flowy uses your microphone to record voice and video messages.', recordAudioAndroid: true, }, ], [ - "expo-audio", + 'expo-audio', { microphonePermission: - "Flowy uses your microphone to record voice messages.", + 'Flowy uses your microphone to record voice messages.', }, ], [ - "expo-notifications", + 'expo-notifications', { - icon: "./assets/notification-icon.png", - color: "#000000", + icon: './assets/notification-icon.png', + color: '#000000', }, ], // LiveKit needs WebRTC native modules. The two plugins below patch the // iOS/Android prebuild so camera/mic permissions and the webrtc pod are // wired up correctly for huddles. - "@config-plugins/react-native-webrtc", - "@livekit/react-native-expo-plugin", + '@config-plugins/react-native-webrtc', + '@livekit/react-native-expo-plugin', ], experiments: { typedRoutes: false, }, extra: { eas: { - projectId: "e902f7e5-e514-42bd-9591-75738e3494ed" + projectId: 'e902f7e5-e514-42bd-9591-75738e3494ed', }, appEnv: APP_ENV, diff --git a/js/mobile/babel.config.js b/js/mobile/babel.config.js index 4c12ec8..a009d68 100644 --- a/js/mobile/babel.config.js +++ b/js/mobile/babel.config.js @@ -2,9 +2,9 @@ module.exports = function (api) { api.cache(true); return { presets: [ - ["babel-preset-expo", { jsxImportSource: "nativewind" }], - "nativewind/babel", + ['babel-preset-expo', { jsxImportSource: 'nativewind' }], + 'nativewind/babel', ], - plugins: ["react-native-worklets/plugin"], + plugins: ['react-native-worklets/plugin'], }; }; diff --git a/js/mobile/eslint.config.js b/js/mobile/eslint.config.js index f1e5060..3959f0d 100644 --- a/js/mobile/eslint.config.js +++ b/js/mobile/eslint.config.js @@ -1,7 +1,7 @@ // https://docs.expo.dev/guides/using-eslint/ -const { defineConfig } = require("eslint/config"); -const expoConfig = require("eslint-config-expo/flat"); -const eslintConfigPrettier = require("eslint-config-prettier"); +const { defineConfig } = require('eslint/config'); +const expoConfig = require('eslint-config-expo/flat'); +const eslintConfigPrettier = require('eslint-config-prettier'); module.exports = defineConfig([ expoConfig, @@ -9,17 +9,17 @@ module.exports = defineConfig([ eslintConfigPrettier, { rules: { - "@typescript-eslint/no-unused-vars": [ - "error", + '@typescript-eslint/no-unused-vars': [ + 'error', { - argsIgnorePattern: "^_", - varsIgnorePattern: "^_", - caughtErrorsIgnorePattern: "^_", + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', }, ], }, }, { - ignores: ["dist/*", ".expo/*"], + ignores: ['dist/*', '.expo/*'], }, ]); diff --git a/js/mobile/index.ts b/js/mobile/index.ts index e0a2575..cb26db8 100644 --- a/js/mobile/index.ts +++ b/js/mobile/index.ts @@ -1,7 +1,7 @@ -import "./global.css"; -import { registerGlobals } from "@livekit/react-native"; -import { registerRootComponent } from "expo"; -import App from "./src/App"; +import './global.css'; +import { registerGlobals } from '@livekit/react-native'; +import { registerRootComponent } from 'expo'; +import App from './src/App'; // LiveKit pipes WebRTC globals (RTCPeerConnection, mediaDevices, ...) onto the // JS global. Must run before any LiveKit client is constructed, so do it at diff --git a/js/mobile/metro.config.js b/js/mobile/metro.config.js index b0963fe..f3321ba 100644 --- a/js/mobile/metro.config.js +++ b/js/mobile/metro.config.js @@ -1,6 +1,6 @@ -const { getDefaultConfig } = require("expo/metro-config"); -const { withNativeWind } = require("nativewind/metro"); +const { getDefaultConfig } = require('expo/metro-config'); +const { withNativeWind } = require('nativewind/metro'); const config = getDefaultConfig(__dirname); -module.exports = withNativeWind(config, { input: "./global.css" }); +module.exports = withNativeWind(config, { input: './global.css' }); diff --git a/js/mobile/package.json b/js/mobile/package.json index 77912fb..1b18682 100644 --- a/js/mobile/package.json +++ b/js/mobile/package.json @@ -10,8 +10,8 @@ "android": "expo run:android", "compile": "tsc --noEmit", "lint": "expo lint", - "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"", - "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"" + "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\" \"*.{ts,tsx,js,cjs,json}\"", + "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\" \"*.{ts,tsx,js,cjs,json}\"" }, "packageManager": "yarn@1.22.22", "dependencies": { diff --git a/js/mobile/tailwind.config.js b/js/mobile/tailwind.config.js index a4516ff..eba0a19 100644 --- a/js/mobile/tailwind.config.js +++ b/js/mobile/tailwind.config.js @@ -8,43 +8,43 @@ // written against `bg-background`, `text-foreground`, etc. behave identically // to the desktop app in dark mode. module.exports = { - content: ["./index.ts", "./src/**/*.{ts,tsx}"], - presets: [require("nativewind/preset")], + content: ['./index.ts', './src/**/*.{ts,tsx}'], + presets: [require('nativewind/preset')], theme: { extend: { colors: { - background: "#252525", // oklch(0.145 0 0) - foreground: "#fafafa", // oklch(0.985 0 0) - card: "#363636", // oklch(0.205 0 0) - "card-foreground": "#fafafa", - popover: "#363636", - "popover-foreground": "#fafafa", - primary: "#ebebeb", // oklch(0.922 0 0) - "primary-foreground": "#363636", - secondary: "#454545", // oklch(0.269 0 0) - "secondary-foreground": "#fafafa", - muted: "#454545", - "muted-foreground": "#a6a6a6", // oklch(0.708 0 0) - accent: "#454545", - "accent-foreground": "#fafafa", - destructive: "#ef4444", // oklch(0.704 0.191 22.216) - border: "rgba(255,255,255,0.1)", // oklch(1 0 0 / 10%) - input: "rgba(255,255,255,0.15)", // oklch(1 0 0 / 15%) - ring: "#878787", // oklch(0.556 0 0) - sidebar: "#363636", - "sidebar-foreground": "#fafafa", - "sidebar-primary": "#6366f1", // chart-1 dark = oklch(0.488 0.243 264.376) - "sidebar-primary-foreground": "#fafafa", - "sidebar-accent": "#454545", - "sidebar-accent-foreground": "#fafafa", - "sidebar-border": "rgba(255,255,255,0.1)", - "sidebar-ring": "#878787", + background: '#252525', // oklch(0.145 0 0) + foreground: '#fafafa', // oklch(0.985 0 0) + card: '#363636', // oklch(0.205 0 0) + 'card-foreground': '#fafafa', + popover: '#363636', + 'popover-foreground': '#fafafa', + primary: '#ebebeb', // oklch(0.922 0 0) + 'primary-foreground': '#363636', + secondary: '#454545', // oklch(0.269 0 0) + 'secondary-foreground': '#fafafa', + muted: '#454545', + 'muted-foreground': '#a6a6a6', // oklch(0.708 0 0) + accent: '#454545', + 'accent-foreground': '#fafafa', + destructive: '#ef4444', // oklch(0.704 0.191 22.216) + border: 'rgba(255,255,255,0.1)', // oklch(1 0 0 / 10%) + input: 'rgba(255,255,255,0.15)', // oklch(1 0 0 / 15%) + ring: '#878787', // oklch(0.556 0 0) + sidebar: '#363636', + 'sidebar-foreground': '#fafafa', + 'sidebar-primary': '#6366f1', // chart-1 dark = oklch(0.488 0.243 264.376) + 'sidebar-primary-foreground': '#fafafa', + 'sidebar-accent': '#454545', + 'sidebar-accent-foreground': '#fafafa', + 'sidebar-border': 'rgba(255,255,255,0.1)', + 'sidebar-ring': '#878787', }, borderRadius: { - lg: "10px", // --radius: 0.625rem - md: "8px", - sm: "6px", - xl: "14px", + lg: '10px', // --radius: 0.625rem + md: '8px', + sm: '6px', + xl: '14px', }, }, }, diff --git a/js/mobile/tsconfig.json b/js/mobile/tsconfig.json index 270bd74..e7f3f21 100644 --- a/js/mobile/tsconfig.json +++ b/js/mobile/tsconfig.json @@ -4,20 +4,10 @@ "strict": true, "baseUrl": ".", "paths": { - "@/*": [ - "src/*" - ] + "@/*": ["src/*"] }, - "types": [ - "nativewind/types" - ] + "types": ["nativewind/types"] }, - "include": [ - "**/*.ts", - "**/*.tsx", - "nativewind-env.d.ts" - ], - "exclude": [ - "node_modules" - ] + "include": ["**/*.ts", "**/*.tsx", "nativewind-env.d.ts"], + "exclude": ["node_modules"] }