Skip to content

Commit

Permalink
feat: initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
XionWCFM committed Jan 13, 2025
1 parent 8a935ab commit e4539c5
Show file tree
Hide file tree
Showing 21 changed files with 3,203 additions and 366 deletions.
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {},
"editor.formatOnSave": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)", "'([^']*)'"],
["cva\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)", "\"([^\"]*)\""],
["cva\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)", "`([^`]*)`"]
],
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.validate.enable": true
}
38 changes: 24 additions & 14 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { StatusBar } from "expo-status-bar";
import { WebView } from "~/shared/bridge";
import { Providers } from "~/app/Providers";

const BASE_URL = __DEV__ ? "http://localhost:5173" : "https://app.azito.kr";
const DECELERATION_RATE = 0.999;
const JAVASCRIPT_BEFORE_CONTENTLOADED = `window.__APP_DEV__="${
__DEV__ ? "development" : "production"
}";`;

export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.tsx to start working on your app!</Text>
<Providers>
<StatusBar style="auto" />
</View>
<WebView
source={{ uri: BASE_URL }}
style={{ flex: 1 }}
mixedContentMode={"always"}
webviewDebuggingEnabled={__DEV__}
javaScriptEnabled={true}
bounces={true}
allowsBackForwardNavigationGestures={true}
decelerationRate={DECELERATION_RATE}
overScrollMode={"never"}
scrollEnabled={true}
injectedJavaScriptBeforeContentLoaded={JAVASCRIPT_BEFORE_CONTENTLOADED}
/>
</Providers>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
52 changes: 26 additions & 26 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"expo": {
"name": "cmc-mobile",
"slug": "cmc-mobile",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"newArchEnabled": true,
"splash": {
"image": "./assets/splash-icon.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
}
"expo": {
"name": "Mercury",
"slug": "Mercury",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"newArchEnabled": true,
"splash": {
"image": "./assets/splash-icon.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
71 changes: 71 additions & 0 deletions biome-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json",
"extends": ["./biome.json"],
"linter": {
"ignore": ["**/vitest.setup.tsx"],
"rules": {
"suspicious": {
"noConsole": {
"level": "error",
"fix": "safe",
"options": { "allow": ["error"] }
},
"noGlobalIsNan": {
"fix": "safe",
"level": "error"
},
"noDoubleEquals": {
"fix": "safe",
"level": "error",
"options": { "ignoreNull": true }
}
},
"style": {
"useBlockStatements": {
"fix": "safe",
"level": "error"
},
"useImportType": {
"fix": "safe",
"level": "error"
},
"useNodejsImportProtocol": {
"fix": "safe",
"level": "error"
},
"noUselessElse": {
"fix": "safe",
"level": "error"
}
},
"correctness": {
"recommended": true,
"noNodejsModules": {
"level": "off"
},
"noUnusedImports": {
"fix": "safe",
"level": "warn"
},
"noUnusedVariables": {
"fix": "safe",
"level": "warn"
}
},
"complexity": {
"noUselessSwitchCase": {
"fix": "safe",
"level": "error"
},
"useOptionalChain": {
"fix": "safe",
"level": "error"
},
"useLiteralKeys": {
"fix": "safe",
"level": "error"
}
}
}
}
}
180 changes: 180 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json",
"formatter": {
"enabled": false,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 160,
"attributePosition": "auto",
"ignore": [
"**/node_modules",
"**/.next",
"**/.husky",
"**/.public",
"**/package-lock.json",
"**/*.png",
"**/*.js",
"**/.vercel/*",
"**/.expo",
"**/.expo/**",
"**/ios",
"**/android"
]
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"all": true,
"suspicious": {
"noReactSpecificProps": "off",
"noExplicitAny": "off",
"useAwait": "off",
"noEmptyBlockStatements": "off",
"noConsole": "off",
"noConsoleLog": "off",
"noArrayIndexKey": "warn",
"noGlobalIsNan": "warn",
"noEmptyBlock": "warn",
"noPrototypeBuiltins": "warn",
"noConfusingVoidType": "warn",
"noImplicitAnyLet": "warn"
},
"performance": {
"useTopLevelRegex": {
"level": "off"
},
"noBarrelFile": "warn",
"noReExportAll": "warn",
"noAccumulatingSpread": "warn"
},
"style": {
"recommended": true,
"noDefaultExport": "off",
"noNamespaceImport": "off",
"useSelfClosingElements": "off",
"useTemplate": "warn",
"noNonNullAssertion": "off",
"noUnusedTemplateLiteral": "off",
"noParameterAssign": "off",
"useDefaultParameterLast": "off",
"useNamingConvention": "off",
"useFragmentSyntax": "off",
"useConsistentArrayType": {
"fix": "safe",
"level": "error",
"options": { "syntax": "shorthand" }
},
"useShorthandArrayType": {
"fix": "safe",
"level": "error"
},
"useFilenamingConvention": {
"level": "warn",
"options": {
"filenameCases": ["camelCase", "PascalCase", "kebab-case"]
}
},
"useBlockStatements": {
"fix": "safe",
"level": "off"
},
"useImportType": {
"fix": "safe",
"level": "off"
}
},
"correctness": {
"recommended": true,
"useImportExtensions": "off",
"noUndeclaredDependencies": "off",
"noUnusedFunctionParameters": "warn",
"useExhaustiveDependencies": "warn",
"noEmptyPattern": "warn",
"noNodejsModules": {
"level": "off"
},
"noUnusedImports": "off",
"noUnusedVariables": "off"
},
"complexity": {
"recommended": true,
"noForEach": "off",
"noUselessFragments": "off",
"noStaticOnlyClass": "off",
"noBannedTypes": "warn",
"useArrowFunction": "warn",
"noUselessTernary": "warn"
},
"security": {
"noDangerouslySetInnerHtml": "warn"
},
"a11y": {
"recommended": true,
"noAccessKey": "error",
"noAriaUnsupportedElements": "error",
"noAutofocus": "error",
"useButtonType": "off",
"noLabelWithoutControl": "warn",
"noDistractingElements": "error",
"noHeaderScope": "error",
"noInteractiveElementToNoninteractiveRole": "error",
"noNoninteractiveElementToInteractiveRole": "error",
"noNoninteractiveTabindex": "error",
"noPositiveTabindex": "error",
"noRedundantAlt": "error",
"noRedundantRoles": "error",
"useAltText": "error",
"useAnchorContent": "error",
"useAriaActivedescendantWithTabindex": "error",
"useAriaPropsForRole": "error",
"noSvgWithoutTitle": "warn",
"useHeadingContent": "error",
"useHtmlLang": "error",
"useIframeTitle": "error",
"useKeyWithClickEvents": "warn",
"useKeyWithMouseEvents": "warn",
"useMediaCaption": "error",
"useValidAnchor": "error",
"useValidAriaProps": "error",
"useValidAriaRole": "error",
"useValidAriaValues": "error",
"useSemanticElements": "warn"
}
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "all",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"quoteStyle": "double",
"attributePosition": "auto"
},
"globals": ["describe", "it", "test", "expect", "JSX", "React", "beforeEach", "afterEach", "vi", "afterAll", "beforeAll"]
},
"files": {
"ignore": [
"**/.gitignore",
"**/.yarn/*",
"**/.pnp.*",
"**/.turbo/*",
"**/build/*",
"**/.vercel/*",
"**/coverage/*",
"**/dist/*",
"**/.next/*",
"**/node_modules/*",
"*storybook.log",
"**/.expo",
"**/ios",
"**/android"
]
}
}
1 change: 1 addition & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
Loading

0 comments on commit e4539c5

Please sign in to comment.