Skip to content

Commit

Permalink
とりあえずapps/webでlint-staged通った
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-20 committed Nov 30, 2023
1 parent 55f1d7d commit 01100af
Show file tree
Hide file tree
Showing 31 changed files with 409 additions and 677 deletions.
4 changes: 4 additions & 0 deletions .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"

pnpm lint-staged --allow-empty
10 changes: 5 additions & 5 deletions apps/server/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"trailingComma": "all",
"tabWidth": 2,
"singleQuote": true,
"jsxSingleQuote": false,
"semi": true
"trailingComma": "all",
"tabWidth": 2,
"singleQuote": true,
"jsxSingleQuote": false,
"semi": true
}
10 changes: 5 additions & 5 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
"dev": "bun run --hot src/main.ts"
},
"dependencies": {
"@hono/zod-openapi": "^0.8.3",
"@hono/zod-openapi": "^0.9.0",
"@read-stack/database": "workspace:*",
"@read-stack/lib": "workspace:*",
"@read-stack/openapi": "workspace:*",
"@read-stack/tsconfig": "workspace:*",
"@supabase/supabase-js": "^2.26.0",
"hono": "^3.10.0",
"zod": "^3.21.4"
"@supabase/supabase-js": "^2.39.0",
"hono": "^3.10.3",
"zod": "^3.22.4"
},
"devDependencies": {
"bun-types": "^1.0.7",
"bun-types": "^1.0.14",
"@read-stack/eslint-config": "workspace:*"
}
}
4 changes: 0 additions & 4 deletions apps/web/.husky/pre-commit

This file was deleted.

37 changes: 0 additions & 37 deletions apps/web/.prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions apps/web/.prettierrc.json

This file was deleted.

13 changes: 13 additions & 0 deletions apps/web/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://biomejs.dev/schemas/1.4.0/schema.json",
"extends": ["../../biome.json"],
"files": {
"ignore": ["./lib.dom.d.ts", "./src/shared/lib/$path.ts"]
},
"linter": {
"enabled": false
},
"vcs": {
"root": "../../"
}
}
21 changes: 3 additions & 18 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,23 @@
"lint": "eslint src --ext .tsx,.ts",
"stylelint": "stylelint --ignore-path .gitignore './src/**/*.{jsx,tsx,css,scss}'",
"fix": "pnpm lint --fix && pnpm stylelint --fix && pnpm format",
"typecheck": "tsc",
"prettier": "prettier --config .prettierrc.json './**/*.{js,jsx,ts,tsx,json,md}'",
"format": "pnpm prettier --write",
"prepare": "cd ../../ && husky install ./apps/web/.husky",
"preinstall": "npx only-allow pnpm"
"format": "biome format --write .",
"typecheck": "tsc"
},
"dependencies": {
"@asteasolutions/zod-to-openapi": "^6.2.0",
"@emotion/react": "^11.11.1",
"@emotion/server": "^11.11.0",
"@hono/zod-openapi": "^0.8.3",
"@mantine/core": "^6.0.16",
"@mantine/form": "^6.0.16",
"@mantine/hooks": "^6.0.16",
"@mantine/next": "^6.0.16",
"@read-stack/database": "workspace:*",
"@read-stack/openapi": "workspace:*",
"@supabase/auth-helpers-nextjs": "^0.7.2",
"@supabase/auth-helpers-react": "^0.4.0",
"@supabase/supabase-js": "^2.26.0",
"@tabler/icons-react": "^2.23.0",
"cheerio": "1.0.0-rc.12",
"drizzle-orm": "^0.28.6",
"hono": "^3.10.0",
"jotai": "^2.2.1",
"next": "^13.4.8",
"postgres": "^3.4.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-toastify": "^9.1.3",
Expand All @@ -58,20 +48,15 @@
"@types/react-dom": "18.0.11",
"@types/uuid": "^9.0.2",
"@vitejs/plugin-react-swc": "^3.3.1",
"drizzle-kit": "^0.19.13",
"husky": "^8.0.3",
"lint-staged": "^13.2.2",
"npm-run-all": "^4.1.5",
"pathpida": "^0.20.1",
"postcss": "^8.4.23",
"postcss-syntax": "^0.36.2",
"prettier": "^2.8.8",
"stylelint": "^14.16.1",
"stylelint-config-idiomatic-order": "^9.0.0",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^3.0.0",
"typescript": "^5.0.4"
"stylelint-prettier": "^3.0.0"
},
"lint-staged": {
"*.{ts,tsx}": "pnpm lint",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/client/Auth/_components/AuthHeading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export const AuthHeading: FC<HeadingProps> = ({ children }) => {
return (
<h1
css={css`
text-align: center;
margin-bottom: 32px;
color: #111;
text-align: center;
`}
>
{children}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/client/Auth/_components/AuthLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export const AuthLayout: FC<AuthLayoutProps> = ({ children }) => {
<div
css={css`
display: flex;
flex-direction: column;
max-width: 540px;
flex-direction: column;
padding: 64px 16px 0;
margin: 0 auto;
padding: 64px 16px 0 16px;
`}
>
{children}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/client/Home/_components/Status/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export const Status = () => {
<div>今まで読んだ記事の数: {20}</div>
</div>
);
}
};
68 changes: 36 additions & 32 deletions apps/web/src/client/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,56 @@ export const Home: NextPage = () => {

return (
<div
css={css`
css={css`
padding: 1rem;
`}
>
<h2
css={css`
>
<h2
css={css`
display: flex;
align-items: end;
justify-content: space-between;
border-bottom: 1px solid #ccc;
margin-bottom: 1rem;
`}
>
<div>未読の記事一覧</div>
<Flex align="center" gap={16}>
<Checkbox
aria-label="既に読んだ記事を含めるかどうか"
checked={includeRead}
icon={IconBook2}
indeterminate
onChange={(e) => { setIncludeRead(e.currentTarget.checked); }}
size="lg"
title="既に読んだ記事を含めるかどうか"
/>
<SegmentedControl
data={[
{ label: 'Card', value: 'panel' },
{ label: 'List', value: 'list' },
]}
onChange={(type) => { setViewType(type as UnreadClipViewType); }}
value={viewType}
/>
</Flex>
</h2>
<UnreadClips includeRead={includeRead} type={viewType} />
<div
css={css`
>
<div>未読の記事一覧</div>
<Flex align="center" gap={16}>
<Checkbox
aria-label="既に読んだ記事を含めるかどうか"
checked={includeRead}
icon={IconBook2}
indeterminate
onChange={(e) => {
setIncludeRead(e.currentTarget.checked);
}}
size="lg"
title="既に読んだ記事を含めるかどうか"
/>
<SegmentedControl
data={[
{ label: 'Card', value: 'panel' },
{ label: 'List', value: 'list' },
]}
onChange={(type) => {
setViewType(type as UnreadClipViewType);
}}
value={viewType}
/>
</Flex>
</h2>
<UnreadClips includeRead={includeRead} type={viewType} />
<div
css={css`
position: fixed;
z-index: 100;
right: 1rem;
bottom: 1rem;
box-shadow: ${theme.shadows.md};
`}
>
<AddClipButton />
</div>
>
<AddClipButton />
</div>
</div>
);
};
12 changes: 0 additions & 12 deletions apps/web/src/features/database/drizzleClient.ts

This file was deleted.

89 changes: 0 additions & 89 deletions apps/web/src/features/database/models.ts

This file was deleted.

Loading

0 comments on commit 01100af

Please sign in to comment.