infra: add linting and formatting for js projects (#230)
* wip * wip * wip * format * wip(mobile): lint and format * cleanup * nits * nits * idiomatic react * nit * format all root files
This commit was merged in pull request #230.
This commit is contained in:
+21
-21
@@ -1,4 +1,4 @@
|
||||
import Constants from "expo-constants";
|
||||
import Constants from 'expo-constants';
|
||||
|
||||
// Expo-side equivalent of desktop's __APP_ENV__ build-time replacement
|
||||
// (see js/desktop/src/config/env.ts). On mobile we read from app.config.ts
|
||||
@@ -26,38 +26,38 @@ type AppConfig = {
|
||||
sentryDsn: string;
|
||||
};
|
||||
|
||||
const configs: Record<"dev" | "prod", AppConfig> = {
|
||||
const configs: Record<'dev' | 'prod', AppConfig> = {
|
||||
dev: {
|
||||
orionUrl: "https://orion.dev.flowy.live",
|
||||
pusherUrl: "wss://pusher.dev.flowy.live/ws",
|
||||
orionUrl: 'https://orion.dev.flowy.live',
|
||||
pusherUrl: 'wss://pusher.dev.flowy.live/ws',
|
||||
firebase: {
|
||||
apiKey: "AIzaSyDF_fbk7tDY9tNxUiOwwi--2nYZWZygMGk",
|
||||
appId: "1:1006580076785:web:e2a0736d60a78e02b15950",
|
||||
authDomain: "flowy-dev-440017.firebaseapp.com",
|
||||
messagingSenderId: "1006580076785",
|
||||
projectId: "flowy-dev-440017",
|
||||
storageBucket: "flowy-dev-440017.firebasestorage.app",
|
||||
apiKey: 'AIzaSyDF_fbk7tDY9tNxUiOwwi--2nYZWZygMGk',
|
||||
appId: '1:1006580076785:web:e2a0736d60a78e02b15950',
|
||||
authDomain: 'flowy-dev-440017.firebaseapp.com',
|
||||
messagingSenderId: '1006580076785',
|
||||
projectId: 'flowy-dev-440017',
|
||||
storageBucket: 'flowy-dev-440017.firebasestorage.app',
|
||||
},
|
||||
sentryDsn:
|
||||
"https://4bb3af832825929eeec8ab4edd56930f@o4511282312118272.ingest.us.sentry.io/4511282313494528",
|
||||
'https://4bb3af832825929eeec8ab4edd56930f@o4511282312118272.ingest.us.sentry.io/4511282313494528',
|
||||
},
|
||||
prod: {
|
||||
orionUrl: "https://orion.flowy.live",
|
||||
pusherUrl: "wss://pusher.flowy.live/ws",
|
||||
orionUrl: 'https://orion.flowy.live',
|
||||
pusherUrl: 'wss://pusher.flowy.live/ws',
|
||||
firebase: {
|
||||
apiKey: "AIzaSyB8it3SKr9DHScHGlpu4uwWicvt8wzjdBg",
|
||||
appId: "1:68063426854:web:5054f16f50898f5706e9e7",
|
||||
authDomain: "flowy-prod-440017.firebaseapp.com",
|
||||
messagingSenderId: "68063426854",
|
||||
projectId: "flowy-prod-440017",
|
||||
storageBucket: "flowy-prod-440017.firebasestorage.app",
|
||||
apiKey: 'AIzaSyB8it3SKr9DHScHGlpu4uwWicvt8wzjdBg',
|
||||
appId: '1:68063426854:web:5054f16f50898f5706e9e7',
|
||||
authDomain: 'flowy-prod-440017.firebaseapp.com',
|
||||
messagingSenderId: '68063426854',
|
||||
projectId: 'flowy-prod-440017',
|
||||
storageBucket: 'flowy-prod-440017.firebasestorage.app',
|
||||
},
|
||||
sentryDsn:
|
||||
"https://4bb3af832825929eeec8ab4edd56930f@o4511282312118272.ingest.us.sentry.io/4511282313494528",
|
||||
'https://4bb3af832825929eeec8ab4edd56930f@o4511282312118272.ingest.us.sentry.io/4511282313494528',
|
||||
},
|
||||
};
|
||||
|
||||
const rawEnv = (Constants.expoConfig?.extra as { appEnv?: string } | undefined)
|
||||
?.appEnv;
|
||||
export const appEnv: "dev" | "prod" = rawEnv === "prod" ? "prod" : "dev";
|
||||
export const appEnv: 'dev' | 'prod' = rawEnv === 'prod' ? 'prod' : 'dev';
|
||||
export const appConfig: AppConfig = configs[appEnv];
|
||||
|
||||
Reference in New Issue
Block a user