Skip to content

Commit

Permalink
Merge branch 'main' into client-api
Browse files Browse the repository at this point in the history
  • Loading branch information
Taehoya authored Mar 6, 2024
2 parents 7d76469 + b521803 commit bf66aff
Show file tree
Hide file tree
Showing 8 changed files with 2,049 additions and 1,271 deletions.
53 changes: 52 additions & 1 deletion client/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
{
"extends": "next/core-web-vitals"
"root": true,
"env": {
"es6": true,
"browser": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": { "jsx": true }
},
"settings": {
"import/resolver": {
"node": {}
},
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] }
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"next",
"next/core-web-vitals",
"prettier"
],
"plugins": ["@typescript-eslint", "react"],
"rules": {
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/naming-convention": [
"error",
{ "format": ["camelCase", "PascalCase"], "selector": "function" },
{ "format": ["PascalCase"], "selector": "interface" },
{ "format": ["PascalCase"], "selector": "typeAlias" }
],
"@typescript-eslint/no-unused-vars": [
"error",
{ "ignoreRestSiblings": true }
],
"import/order": [
"error",
{
"groups": ["builtin", "external", "parent", "sibling", "index"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "never"
}
]
},
"ignorePatterns": ["node_modules/", "out/", "build/", ".next/", "public/"]
}
4 changes: 4 additions & 0 deletions client/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd ./client && npx lint-staged
4 changes: 4 additions & 0 deletions client/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package-lock.json
yarn.lock
node_modules
.github
8 changes: 8 additions & 0 deletions client/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"bracketSpacing": true,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"tabWidth": 2
}
21 changes: 19 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next dev",
"lint": "next lint"
"prepare": "cd .. && husky install client/.husky",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
},
"dependencies": {
"@emotion/react": "^11.11.1",
Expand All @@ -27,6 +28,7 @@
"date-fns": "^2.30.0",
"eslint": "8.47.0",
"eslint-config-next": "13.4.13",
"eslint-plugin-import": "^2.29.1",
"i18next": "^23.6.0",
"leaflet": "^1.9.4",
"next": "13.4.13",
Expand All @@ -48,6 +50,21 @@
"@svgr/webpack": "^8.1.0",
"@tanstack/react-query-devtools": "4.32.6",
"@types/leaflet": "^1.9.8",
"@types/react-swipeable-views": "^0.13.5"
"@types/react-swipeable-views": "^0.13.5",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"eslint-config-prettier": "^8.9.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-react": "^7.33.1",
"husky": "^8.0.3",
"lint-staged": "13.2.2",
"prettier": "2.8.8"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --write"
]
}
}
5 changes: 3 additions & 2 deletions client/src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import ReactQueryProvider from "@/lib/react-query/ReactQueryProvider";
import { NextIntlClientProvider } from "next-intl";
import { notFound } from "next/navigation";


export function generateStaticParams() {
return [{ locale: "en" }, { locale: "kr" }];
return [{ locale: 'en' }, { locale: 'kr' }];
}

export default async function LocaleLayout({
Expand All @@ -19,7 +20,7 @@ export default async function LocaleLayout({

return (
<html lang={locale}>
<body style={{ margin: 0}}>
<body style={{ margin: 0 }}>
<NextIntlClientProvider locale={locale} messages={messages}>
<ReactQueryProvider>
{children}
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export default function Home() {
<MenuItem value="coming-soon">{t("future")}</MenuItem>
<MenuItem value="past">{t("present")}</MenuItem>
</Select>

{/* Change View */}
<IconButton onClick={controlChangeView}>
{swipeView ? <WindowIcon /> : <ListIcon />}
Expand Down Expand Up @@ -185,6 +184,7 @@ export default function Home() {
},
}}
>

<MultiPageForm closeForm={closeTravelNote} />
</Dialog>
</div>
Expand Down
Loading

0 comments on commit bf66aff

Please sign in to comment.