Skip to content

Commit 64d607c

Browse files
committed
lint: frontend
1 parent 249bcb4 commit 64d607c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+767
-739
lines changed

apps/frontend/.prettierignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
package-lock.json
22
pnpm-lock.yaml
3-
yarn.lock
3+
yarn.lock
4+
**/build
5+
**/public
6+
routeTree.gen.ts

apps/frontend/eslint.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22

33
import { tanstackConfig } from '@tanstack/eslint-config'
44

5-
export default [...tanstackConfig]
5+
export default [
6+
...tanstackConfig,
7+
{
8+
ignores: ['eslint.config.js', 'prettier.config.js'],
9+
},
10+
]

apps/frontend/intlayer.config.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import type { IntlayerConfig } from "intlayer";
2-
3-
import { Locales } from "intlayer";
4-
5-
const config: IntlayerConfig = {
6-
internationalization: {
7-
defaultLocale: Locales.ENGLISH,
8-
locales: [Locales.ENGLISH, Locales.FRENCH],
9-
},
10-
};
11-
1+
import { Locales } from "intlayer";
2+
import type { IntlayerConfig } from "intlayer";
3+
4+
5+
const config: IntlayerConfig = {
6+
internationalization: {
7+
defaultLocale: Locales.ENGLISH,
8+
locales: [Locales.ENGLISH, Locales.FRENCH],
9+
},
10+
};
11+
1212
export default config;

apps/frontend/package.json

Lines changed: 67 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,67 @@
1-
{
2-
"name": "@boilerplate/frontend",
3-
"private": true,
4-
"type": "module",
5-
"scripts": {
6-
"dev": "vite dev",
7-
"build": "vite build",
8-
"serve": "vite preview",
9-
"lint": "eslint",
10-
"format": "prettier",
11-
"check": "prettier --write . && eslint --fix",
12-
"deploy": "wrangler deploy"
13-
},
14-
"dependencies": {
15-
"@boilerplate/backend": "workspace:*",
16-
"@boilerplate/design-system": "workspace:*",
17-
"@cloudflare/vite-plugin": "^1.13.10",
18-
"@dnd-kit/core": "^6.3.1",
19-
"@dnd-kit/modifiers": "^9.0.0",
20-
"@dnd-kit/sortable": "^10.0.0",
21-
"@dnd-kit/utilities": "^3.2.2",
22-
"@faker-js/faker": "^10.0.0",
23-
"@sentry/tanstackstart-react": "^10.17.0",
24-
"@tailwindcss/vite": "^4.1.14",
25-
"@tanstack/match-sorter-utils": "^8.19.4",
26-
"@tanstack/react-devtools": "^0.7.2",
27-
"@tanstack/react-form": "^1.23.5",
28-
"@tanstack/react-query": "^5.90.2",
29-
"@tanstack/react-query-devtools": "^5.90.2",
30-
"@tanstack/react-router": "^1.132.33",
31-
"@tanstack/react-router-devtools": "^1.132.33",
32-
"@tanstack/react-router-ssr-query": "^1.132.33",
33-
"@tanstack/react-start": "^1.132.36",
34-
"@tanstack/react-table": "^8.21.3",
35-
"@tanstack/router-plugin": "^1.132.33",
36-
"@tuyau/client": "0.2.11-next.2",
37-
"@tuyau/react-query": "0.0.1-next.2",
38-
"intlayer": "^6.1.6",
39-
"lucide-react": "^0.544.0",
40-
"react": "^19.2.0",
41-
"react-dom": "^19.2.0",
42-
"react-intlayer": "^6.1.6",
43-
"recharts": "^3.2.1",
44-
"sonner": "^1.7.4",
45-
"tailwindcss": "^4.1.14",
46-
"zod": "^4.1.11"
47-
},
48-
"devDependencies": {
49-
"@tanstack/eslint-config": "^0.3.2",
50-
"@testing-library/dom": "^10.4.1",
51-
"@testing-library/react": "^16.3.0",
52-
"@types/node": "^22.18.8",
53-
"@types/react": "^19.2.0",
54-
"@types/react-dom": "^19.2.0",
55-
"@vitejs/plugin-react": "^5.0.4",
56-
"jsdom": "^27.0.0",
57-
"prettier": "^3.6.2",
58-
"typescript": "^5.9.3",
59-
"vite": "^7.1.9",
60-
"vite-intlayer": "^6.1.6",
61-
"vite-tsconfig-paths": "^5.1.4",
62-
"vitest": "^3.2.4",
63-
"web-vitals": "^5.1.0",
64-
"wrangler": "^4.42.0"
65-
}
66-
}
1+
{
2+
"name": "@boilerplate/frontend",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"dev": "vite dev",
7+
"build": "vite build",
8+
"serve": "vite preview",
9+
"lint": "eslint",
10+
"format": "prettier",
11+
"check": "prettier --write . && eslint --fix",
12+
"deploy": "wrangler deploy"
13+
},
14+
"dependencies": {
15+
"@boilerplate/backend": "workspace:*",
16+
"@boilerplate/design-system": "workspace:*",
17+
"@cloudflare/vite-plugin": "^1.13.10",
18+
"@dnd-kit/core": "^6.3.1",
19+
"@dnd-kit/modifiers": "^9.0.0",
20+
"@dnd-kit/sortable": "^10.0.0",
21+
"@dnd-kit/utilities": "^3.2.2",
22+
"@faker-js/faker": "^10.0.0",
23+
"@sentry/tanstackstart-react": "^10.17.0",
24+
"@tailwindcss/vite": "^4.1.14",
25+
"@tanstack/match-sorter-utils": "^8.19.4",
26+
"@tanstack/react-devtools": "^0.7.2",
27+
"@tanstack/react-form": "^1.23.5",
28+
"@tanstack/react-query": "^5.90.2",
29+
"@tanstack/react-query-devtools": "^5.90.2",
30+
"@tanstack/react-router": "^1.132.33",
31+
"@tanstack/react-router-devtools": "^1.132.33",
32+
"@tanstack/react-router-ssr-query": "^1.132.33",
33+
"@tanstack/react-start": "^1.132.36",
34+
"@tanstack/react-table": "^8.21.3",
35+
"@tanstack/router-plugin": "^1.132.33",
36+
"@tuyau/client": "0.2.11-next.2",
37+
"@tuyau/react-query": "0.0.1-next.2",
38+
"intlayer": "^6.1.6",
39+
"lucide-react": "^0.544.0",
40+
"react": "^19.2.0",
41+
"react-dom": "^19.2.0",
42+
"react-intlayer": "^6.1.6",
43+
"recharts": "^3.2.1",
44+
"sonner": "^1.7.4",
45+
"tailwindcss": "^4.1.14",
46+
"zod": "^4.1.11"
47+
},
48+
"devDependencies": {
49+
"@tanstack/eslint-config": "^0.3.2",
50+
"@testing-library/dom": "^10.4.1",
51+
"@testing-library/react": "^16.3.0",
52+
"@types/node": "^22.18.8",
53+
"@types/react": "^19.2.0",
54+
"@types/react-dom": "^19.2.0",
55+
"@vitejs/plugin-react": "^5.0.4",
56+
"eslint": "^9.37.0",
57+
"jsdom": "^27.0.0",
58+
"prettier": "^3.6.2",
59+
"typescript": "^5.9.3",
60+
"vite": "^7.1.9",
61+
"vite-intlayer": "^6.1.6",
62+
"vite-tsconfig-paths": "^5.1.4",
63+
"vitest": "^3.2.4",
64+
"web-vitals": "^5.1.0",
65+
"wrangler": "^4.42.0"
66+
}
67+
}
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
import { Button } from '@boilerplate/design-system/components/ui/button'
2-
import { LogOutIcon } from 'lucide-react'
3-
import { useImpersonation } from '@/hooks/use-impersonation'
4-
import { useIntlayer } from 'react-intlayer'
5-
6-
export function ImpersonationIndicator() {
7-
const content = useIntlayer('admin')
8-
const {
9-
isImpersonating,
10-
currentUser,
11-
originalAdmin,
12-
stopImpersonation,
13-
isLoading,
14-
} = useImpersonation()
15-
16-
if (!isImpersonating || !currentUser || !originalAdmin) {
17-
return null
18-
}
19-
20-
return (
21-
<div className="flex items-center gap-3 bg-secondary rounded-md p-2 h-8">
22-
<div className="text-sm">
23-
<span className="text-muted-foreground">{content.loggedInAs}</span>
24-
<span className="font-medium">
25-
{currentUser.firstName} {currentUser.lastName}
26-
</span>
27-
</div>
28-
<Button
29-
size="sm"
30-
className="h-6"
31-
variant="outline"
32-
onClick={() => stopImpersonation()}
33-
disabled={isLoading}
34-
>
35-
<LogOutIcon className="size-4" />
36-
{content.returnTo({ name: originalAdmin.firstName })}
37-
</Button>
38-
</div>
39-
)
40-
}
1+
import { Button } from '@boilerplate/design-system/components/ui/button'
2+
import { LogOutIcon } from 'lucide-react'
3+
import { useIntlayer } from 'react-intlayer'
4+
import { useImpersonation } from '@/hooks/use-impersonation'
5+
6+
export function ImpersonationIndicator() {
7+
const content = useIntlayer('admin')
8+
const {
9+
isImpersonating,
10+
currentUser,
11+
originalAdmin,
12+
stopImpersonation,
13+
isLoading,
14+
} = useImpersonation()
15+
16+
if (!isImpersonating || !currentUser || !originalAdmin) {
17+
return null
18+
}
19+
20+
return (
21+
<div className="flex items-center gap-3 bg-secondary rounded-md p-2 h-8">
22+
<div className="text-sm">
23+
<span className="text-muted-foreground">{content.loggedInAs}</span>
24+
<span className="font-medium">
25+
{currentUser.firstName} {currentUser.lastName}
26+
</span>
27+
</div>
28+
<Button
29+
size="sm"
30+
className="h-6"
31+
variant="outline"
32+
onClick={() => stopImpersonation()}
33+
disabled={isLoading}
34+
>
35+
<LogOutIcon className="size-4" />
36+
{content.returnTo({ name: originalAdmin.firstName })}
37+
</Button>
38+
</div>
39+
)
40+
}

apps/frontend/src/components/admin/users-list.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { useState } from 'react'
22
import { useQuery } from '@tanstack/react-query'
3-
import { getUsersListQueryOptions } from '@/lib/queries/admin'
4-
import { useImpersonation } from '@/hooks/use-impersonation'
53
import { Button } from '@boilerplate/design-system/components/ui/button'
64
import { Input } from '@boilerplate/design-system/components/ui/input'
75
import { UserIcon } from 'lucide-react'
8-
import Loader from '@/components/common/loader'
96
import { useIntlayer } from 'react-intlayer'
7+
import Loader from '@/components/common/loader'
8+
import { useImpersonation } from '@/hooks/use-impersonation'
9+
import { getUsersListQueryOptions } from '@/lib/queries/admin'
1010

1111
export function UsersList() {
1212
const content = useIntlayer('admin')

apps/frontend/src/components/auth/forgot-password-form.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import {
66
FieldLabel,
77
} from '@boilerplate/design-system/components/ui/field'
88
import { Input } from '@boilerplate/design-system/components/ui/input'
9-
import { useAppForm } from '@/hooks/form-hook'
109
import { Form } from '@boilerplate/design-system/components/ui/form'
11-
import { forgotPasswordFormSchema } from '@/lib/schemas/auth'
1210
import { useMutation } from '@tanstack/react-query'
11+
import { useIntlayer } from 'react-intlayer'
12+
import { useAppForm } from '@/hooks/form-hook'
13+
import { forgotPasswordFormSchema } from '@/lib/schemas/auth'
1314
import { forgotPasswordMutationOptions } from '@/lib/queries/auth'
1415
import { LocalizedLink } from '@/components/common/localized-link'
15-
import { useIntlayer } from 'react-intlayer'
1616

1717
export function ForgotPasswordForm({
1818
className,

apps/frontend/src/components/auth/login-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import {
88
} from '@boilerplate/design-system/components/ui/field'
99
import { Input } from '@boilerplate/design-system/components/ui/input'
1010
import { PasswordField } from '@boilerplate/design-system/components/ui/password_field'
11-
import { useAppForm } from '@/hooks/form-hook'
1211
import { Form } from '@boilerplate/design-system/components/ui/form'
12+
import { useIntlayer } from 'react-intlayer'
13+
import { useAppForm } from '@/hooks/form-hook'
1314
import { loginFormSchema } from '@/lib/schemas/auth'
1415
import { useAuth } from '@/hooks/use-auth'
1516
import { LocalizedLink } from '@/components/common/localized-link'
16-
import { useIntlayer } from 'react-intlayer'
1717

1818
export function LoginForm({
1919
className,

apps/frontend/src/components/auth/register-form.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import {
77
FieldSeparator,
88
} from '@boilerplate/design-system/components/ui/field'
99
import { Input } from '@boilerplate/design-system/components/ui/input'
10-
import { useAppForm } from '@/hooks/form-hook'
1110
import { Form } from '@boilerplate/design-system/components/ui/form'
12-
import { registerFormSchema } from '@/lib/schemas/auth'
1311
import { useMutation } from '@tanstack/react-query'
14-
import { registerMutationOptions } from '@/lib/queries/auth'
1512
import { PasswordStrength } from '@boilerplate/design-system/components/ui/password-strength'
16-
import { LocalizedLink } from '@/components/common/localized-link'
1713
import { useIntlayer } from 'react-intlayer'
14+
import { useAppForm } from '@/hooks/form-hook'
15+
import { registerFormSchema } from '@/lib/schemas/auth'
16+
import { registerMutationOptions } from '@/lib/queries/auth'
17+
import { LocalizedLink } from '@/components/common/localized-link'
1818

1919
export function RegisterForm({
2020
className,

apps/frontend/src/components/auth/resend-verification-form.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import {
66
FieldLabel,
77
} from '@boilerplate/design-system/components/ui/field'
88
import { Input } from '@boilerplate/design-system/components/ui/input'
9-
import { useAppForm } from '@/hooks/form-hook'
109
import { Form } from '@boilerplate/design-system/components/ui/form'
11-
import { resendVerificationFormSchema } from '@/lib/schemas/auth'
1210
import { useMutation } from '@tanstack/react-query'
11+
import { useIntlayer } from 'react-intlayer'
12+
import { useAppForm } from '@/hooks/form-hook'
13+
import { resendVerificationFormSchema } from '@/lib/schemas/auth'
1314
import { resendVerificationMutationOptions } from '@/lib/queries/auth'
1415
import { LocalizedLink } from '@/components/common/localized-link'
15-
import { useIntlayer } from 'react-intlayer'
1616

1717
export function ResendVerificationForm({
1818
className,

0 commit comments

Comments
 (0)