Skip to content

Commit 13d5d15

Browse files
committed
setup eslint tailwind prettier
1 parent 5bc8fdc commit 13d5d15

File tree

130 files changed

+501
-408
lines changed

Some content is hidden

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

130 files changed

+501
-408
lines changed

.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"plugin:@typescript-eslint/recommended-requiring-type-checking",
1717
"next/core-web-vitals",
1818
"prettier",
19+
"plugin:tailwindcss/recommended",
1920
"plugin:storybook/recommended"
2021
],
2122
"settings": {

.prettierrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["prettier-plugin-tailwindcss"]
3+
}

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@
6464
"eslint-plugin-import": "^2.28.0",
6565
"eslint-plugin-no-relative-import-paths": "^1.5.2",
6666
"eslint-plugin-storybook": "^0.6.15",
67+
"eslint-plugin-tailwindcss": "^3.17.0",
6768
"husky": "^8.0.0",
6869
"jest": "^29.6.2",
6970
"jest-environment-jsdom": "^29.6.2",
7071
"postcss": "8.4.27",
7172
"prettier": "^3.0.1",
73+
"prettier-plugin-tailwindcss": "^0.6.1",
7274
"storybook": "^7.6.4",
7375
"tailwindcss": "3.3.3",
7476
"tsconfig-paths-webpack-plugin": "^4.1.0",

src/app/(auth)/components/AuthBannerContainer.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ export default function AuthBannerContainer() {
1313
/>
1414
</div>
1515

16-
<h3 className="text-primary-focus text-2xl text-center mt-[27px] font-semibold">
16+
<h3 className="mt-[27px] text-center text-2xl font-semibold text-primary-focus">
1717
Ready to dive in?
1818
</h3>
19-
<h2 className="text-primary text-3xl text-center font-semibold">
19+
<h2 className="text-center text-3xl font-semibold text-primary">
2020
Join Chingu today!
2121
</h2>
2222
</div>

src/app/(auth)/layout.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ interface LayoutProps {
88

99
export default function Layout({ children }: LayoutProps) {
1010
return (
11-
<div className="flex flex-col h-screen w-screen">
11+
<div className="flex h-screen w-screen flex-col">
1212
<Navbar>
1313
<div className="pr-2">
1414
<ModeToggle />
1515
</div>
1616
</Navbar>
17-
<main className="flex flex-col items-center w-full p-10 overflow-y-auto h-full">
18-
<div className="gap-y-9 h-full xl:flex">
17+
<main className="flex h-full w-full flex-col items-center overflow-y-auto p-10">
18+
<div className="h-full gap-y-9 xl:flex">
1919
<div className="flex items-center justify-center">
2020
<AuthBannerContainer />
2121
{children}

src/app/(auth)/sign-in/components/EmailCheckContainer.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ function EmailCheckContainer({
4949
}
5050

5151
return (
52-
<div className="flex flex-col items-center w-[400px] min-h-[652px] bg-base-200 rounded-2xl xl:ml-60 px-6 py-9">
53-
<p className="text-base-300 text-2xl text-center mb-[26px] font-medium">
52+
<div className="flex min-h-[652px] w-[400px] flex-col items-center rounded-2xl bg-base-200 px-6 py-9 xl:ml-60">
53+
<p className="mb-[26px] text-center text-2xl font-medium text-base-300">
5454
Reset Link Sent
5555
</p>
5656
<div>
@@ -63,15 +63,15 @@ function EmailCheckContainer({
6363
/>
6464
</div>
6565
<div className="flex flex-col items-center">
66-
<p className="text-base-300 text-xl font-medium mt-8 mb-2">
66+
<p className="mb-2 mt-8 text-xl font-medium text-base-300">
6767
Check Your Email Address
6868
</p>
69-
<p className="text-base-300 text-base font-medium">
69+
<p className="text-base font-medium text-base-300">
7070
If that email address exists, we will send an email to it with a link
7171
to reset your password. Please open it and click on the link in it to
7272
reset your password.
7373
</p>
74-
<p className="text-base-300 text-base font-medium mt-6 mb-[60px] 3xl:mb-[166px]">
74+
<p className="mb-[60px] mt-6 text-base font-medium text-base-300 3xl:mb-[166px]">
7575
If you have not received an email shortly, then please check your
7676
spam/trash folders or click the button below to request a new reset
7777
email.

src/app/(auth)/sign-in/components/ResetPasswordContainer.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ function ResetPasswordContainer({
7575
}
7676

7777
return (
78-
<div className="flex flex-col items-center w-[400px] min-h-[377px] bg-base-200 rounded-2xl xl:ml-60 px-6 py-9">
79-
<p className="text-base-300 text-2xl text-center mb-8 font-medium">
78+
<div className="flex min-h-[377px] w-[400px] flex-col items-center rounded-2xl bg-base-200 px-6 py-9 xl:ml-60">
79+
<p className="mb-8 text-center text-2xl font-medium text-base-300">
8080
Reset Password
8181
</p>
82-
<p className="text-base-300 text-base font-medium mb-8">
82+
<p className="mb-8 text-base font-medium text-base-300">
8383
Enter your email below and we’ll send you a link to reset your password
8484
</p>
85-
<form onSubmit={handleSubmit(onSubmit)} className="flex flex-col w-full">
85+
<form onSubmit={handleSubmit(onSubmit)} className="flex w-full flex-col">
8686
<TextInput
8787
id="email"
8888
label="email"
@@ -93,14 +93,14 @@ function ResetPasswordContainer({
9393
<Button
9494
type="submit"
9595
title="submit"
96-
className="mt-3 mb-3"
96+
className="my-3"
9797
disabled={!isDirty || !isValid || resetPwdReqEmailLoading}
9898
>
9999
{renderButtonContent()}
100100
</Button>
101101
<Link
102102
href={routePaths.signUp()}
103-
className="font-semibold text-xs text-neutral-focus ml-1 self-center"
103+
className="ml-1 self-center text-xs font-semibold text-neutral-focus"
104104
>
105105
Don’t have an account? Sign up for an account now
106106
</Link>

src/app/(auth)/sign-in/components/SignInBlock.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ interface SignInBlockProps {
88
function SignInBlock({ handleResetPassword }: SignInBlockProps) {
99
return (
1010
<>
11-
<div className="w-[400px] min-h-[652px] bg-base-200 rounded-2xl xl:ml-60 p-6">
12-
<p className="text-base-300 text-2xl text-center mt-2.5 mb-[26px] font-medium">
11+
<div className="min-h-[652px] w-[400px] rounded-2xl bg-base-200 p-6 xl:ml-60">
12+
<p className="mb-[26px] mt-2.5 text-center text-2xl font-medium text-base-300">
1313
Welcome to Chingu
1414
</p>
1515
<div className="flex flex-col items-center">
1616
<SocialLoginButtonsContainer />
17-
<div className="flex items-center mt-6 mb-8 w-full">
18-
<hr className="flex-grow border-neutral-content w-11/12" />
19-
<p className="mx-4 text-base-300 font-medium text-base">Or</p>
20-
<hr className="flex-grow border-neutral-content w-11/12" />
17+
<div className="mb-8 mt-6 flex w-full items-center">
18+
<hr className="w-11/12 grow border-neutral-content" />
19+
<p className="mx-4 text-base font-medium text-base-300">Or</p>
20+
<hr className="w-11/12 grow border-neutral-content" />
2121
</div>
2222
</div>
2323
<SignInFormContainer handleResetPassword={handleResetPassword} />

src/app/(auth)/sign-in/components/SignInFormContainer.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function SignInFormContainer({
8383

8484
return (
8585
<form onSubmit={handleSubmit(onSubmit)} className="flex flex-col">
86-
<div className="flex flex-col min-h-[90px]">
86+
<div className="flex min-h-[90px] flex-col">
8787
<div className="flex flex-col gap-y-2">
8888
<TextInput
8989
id="email"
@@ -103,7 +103,7 @@ function SignInFormContainer({
103103
/>
104104
<div
105105
onClick={handleResetPassword}
106-
className="cursor-pointer font-medium text-xs text-base-300 ml-1 mt-2"
106+
className="ml-1 mt-2 cursor-pointer text-xs font-medium text-base-300"
107107
>
108108
Forgot your password?
109109
</div>
@@ -119,7 +119,7 @@ function SignInFormContainer({
119119
</Button>
120120
<Link
121121
href={routePaths.signUp()}
122-
className="font-semibold text-xs text-neutral-focus ml-1 self-center mb-[10px]"
122+
className="mb-[10px] ml-1 self-center text-xs font-semibold text-neutral-focus"
123123
>
124124
Don’t have an account? Sign up for an account now
125125
</Link>

src/app/(auth)/sign-up/components/ConfirmationMailContainer.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import Banner from "@/components/banner/Banner";
33

44
function ConfirmationMailContainer() {
55
return (
6-
<div className="flex flex-col items-center w-[400px] min-h-[652px] bg-base-200 rounded-2xl xl:ml-60 px-6 py-9">
7-
<p className="text-base-300 text-2xl text-center mb-[26px] font-medium">
6+
<div className="flex min-h-[652px] w-[400px] flex-col items-center rounded-2xl bg-base-200 px-6 py-9 xl:ml-60">
7+
<p className="mb-[26px] text-center text-2xl font-medium text-base-300">
88
Welcome to Chingu!
99
</p>
1010
<div>
@@ -17,14 +17,14 @@ function ConfirmationMailContainer() {
1717
/>
1818
</div>
1919
<div className="flex flex-col items-center">
20-
<p className="text-base-300 text-xl font-medium mt-8">
20+
<p className="mt-8 text-xl font-medium text-base-300">
2121
Verify Your Email Address
2222
</p>
23-
<p className="text-base-300 text-base font-medium">
23+
<p className="text-base font-medium text-base-300">
2424
An email was sent to the address you gave us. To get access to Chingu
2525
and all of our features, please check your email and verify it.
2626
</p>
27-
<p className="text-base-300 text-base font-medium mt-6 mb-[166px]">
27+
<p className="mb-[166px] mt-6 text-base font-medium text-base-300">
2828
If you have not received an email shortly, then please check your
2929
spam/trash folders or click the button below to request a new
3030
verification email.

src/app/(auth)/sign-up/components/SignUpContainer.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ function SignUpContainer() {
1818
{showConfirmationContainer ? (
1919
<ConfirmationMailContainer />
2020
) : (
21-
<div className="w-[400px] min-h-[652px] bg-base-200 rounded-2xl xl:ml-60 p-6">
22-
<p className="text-base-300 text-2xl text-center mt-2.5 mb-[26px] font-medium">
21+
<div className="min-h-[652px] w-[400px] rounded-2xl bg-base-200 p-6 xl:ml-60">
22+
<p className="mb-[26px] mt-2.5 text-center text-2xl font-medium text-base-300">
2323
Create a Chingu Account
2424
</p>
2525
<div className="flex flex-col items-center">
2626
<SocialLoginButtonsContainer />
27-
<div className="flex items-center w-full mt-6 mb-8">
28-
<hr className="flex-grow w-11/12 border-neutral-content" />
29-
<p className="mx-4 font-medium text-base-300 text-base">Or</p>
30-
<hr className="flex-grow w-11/12 border-neutral-content" />
27+
<div className="mb-8 mt-6 flex w-full items-center">
28+
<hr className="w-11/12 grow border-neutral-content" />
29+
<p className="mx-4 text-base font-medium text-base-300">Or</p>
30+
<hr className="w-11/12 grow border-neutral-content" />
3131
</div>
3232
</div>
3333
<SignUpFormContainer

src/app/(auth)/sign-up/components/SignUpFormContainer.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function SignUpFormContainer({
4444

4545
return (
4646
<form onSubmit={handleSubmit(onSubmit)} className="flex flex-col">
47-
<div className="flex flex-col min-h-[90px]">
47+
<div className="flex min-h-[90px] flex-col">
4848
<div className="flex flex-col">
4949
<TextInput
5050
id="email"
@@ -70,7 +70,7 @@ function SignUpFormContainer({
7070
</Button>
7171
<Link
7272
href={routePaths.signIn()}
73-
className="font-semibold text-xs text-neutral-focus ml-1 self-center mb-[10px]"
73+
className="mb-[10px] ml-1 self-center text-xs font-semibold text-neutral-focus"
7474
>
7575
Already have an account? Sign in now
7676
</Link>

src/app/(auth)/users/components/NewPasswordContainer.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ function NewPasswordContainer({ onClick }: NewPasswordContainerProps) {
7575
}
7676

7777
return (
78-
<div className="w-[400px] min-h-[349px] bg-base-200 rounded-2xl p-8 xl:ml-60">
79-
<p className="text-base-300 text-2xl text-center mb-8 font-medium">
78+
<div className="min-h-[349px] w-[400px] rounded-2xl bg-base-200 p-8 xl:ml-60">
79+
<p className="mb-8 text-center text-2xl font-medium text-base-300">
8080
Create New Password
8181
</p>
82-
<p className="text-base-300 text-base font-medium pb-8">
82+
<p className="pb-8 text-base font-medium text-base-300">
8383
Enter in a new password below to finish resetting your password.
8484
</p>
85-
<form onSubmit={handleSubmit(onSubmit)} className="flex flex-col ml-0">
86-
<div className="flex flex-col min-h-[90px]">
85+
<form onSubmit={handleSubmit(onSubmit)} className="ml-0 flex flex-col">
86+
<div className="flex min-h-[90px] flex-col">
8787
<div className="flex flex-col">
8888
<TextInput
8989
type="password"

src/app/(auth)/users/components/ResetCompletedContainer.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import Banner from "@/components/banner/Banner";
55

66
function ResetCompletedContainer() {
77
return (
8-
<div className="w-[400px] min-h-[349px] bg-base-200 rounded-2xl p-6 flex flex-col items-center xl:ml-60">
9-
<p className="text-base-300 text-2xl text-center mt-2.5 mb-[22px] font-medium">
8+
<div className="flex min-h-[349px] w-[400px] flex-col items-center rounded-2xl bg-base-200 p-6 xl:ml-60">
9+
<p className="mb-[22px] mt-2.5 text-center text-2xl font-medium text-base-300">
1010
Password Reset!
1111
</p>
1212
<Banner
@@ -16,10 +16,10 @@ function ResetCompletedContainer() {
1616
width="w-[125px]"
1717
alt="Reset Password Image"
1818
/>
19-
<p className="text-base-300 text-xl font-medium pb-8 text-center">
19+
<p className="pb-8 text-center text-xl font-medium text-base-300">
2020
Password Reset Successfully
2121
</p>
22-
<p className="text-base-300 text-base font-medium pb-8">
22+
<p className="pb-8 text-base font-medium text-base-300">
2323
Your password has been reset, please click the button below to sign in
2424
to access your Chingu account.
2525
</p>

src/app/(main)/dashboard/components/Calendar/Calendar.tsx

+14-14
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@ export default function Calendar({
5454
);
5555

5656
return (
57-
<div className="flex h-full w-full max-[1200px]:flex-col max-[1200px]:gap-y-4 max-[1200px]:items-center max-[1200px]:relative">
58-
<div className="min-w-[400px] max-w-[400px] p-6 h-full min-[1200px]:border-r-2 min-[1200px]:min-w-[600px] min-[1200px]:px-28 min-[1470px]:min-w-[400px] min-[1470px]:px-6 border-base-100 flex flex-col items-center">
57+
<div className="flex h-full w-full max-[1200px]:relative max-[1200px]:flex-col max-[1200px]:items-center max-[1200px]:gap-y-4">
58+
<div className="flex h-full min-w-[400px] max-w-[400px] flex-col items-center border-base-100 p-6 min-[1200px]:min-w-[600px] min-[1200px]:border-r-2 min-[1200px]:px-28 min-[1470px]:min-w-[400px] min-[1470px]:px-6">
5959
<div className="flex w-full items-center">
60-
<div className="flex gap-10 items-center w-full justify-center min-[1200px]:relative">
60+
<div className="flex w-full items-center justify-center gap-10 min-[1200px]:relative">
6161
<ArrowLeftIcon
62-
className="w-5 h-5 cursor-pointer hover:scale-105 transition-all absolute left-[14px] max-[1200px]:left-12"
62+
className="absolute left-[14px] h-5 w-5 cursor-pointer transition-all hover:scale-105 max-[1200px]:left-12"
6363
onClick={() => {
6464
onArrowClick(-1);
6565
}}
6666
/>
67-
<h1 className="text-2xl select-none font-semibold">
67+
<h1 className="select-none text-2xl font-semibold">
6868
{currentMonth} {currentYear}
6969
</h1>
7070
<ArrowRightIcon
71-
className="w-5 h-5 cursor-pointer hover:scale-105 transition-all absolute right-[14px] max-[1200px]:right-12"
71+
className="absolute right-[14px] h-5 w-5 cursor-pointer transition-all hover:scale-105 max-[1200px]:right-12"
7272
onClick={() => {
7373
onArrowClick(1);
7474
}}
@@ -79,14 +79,14 @@ export default function Calendar({
7979
{days.map((day) => (
8080
<h1
8181
key={day}
82-
className="text-sm text-center h-14 w-14 grid place-content-center text-base-300 select-none"
82+
className="grid h-14 w-14 select-none place-content-center text-center text-sm text-base-300"
8383
>
8484
{day}
8585
</h1>
8686
))}
8787
</div>
8888

89-
<div className="grid grid-cols-7 border border-base-100 max-w-[352px]">
89+
<div className="grid max-w-[352px] grid-cols-7 border border-base-100">
9090
{generateDate(today.getMonth(), today.getFullYear()).map(
9191
({ date, currentMonth, today }) => (
9292
<div
@@ -120,7 +120,7 @@ export default function Calendar({
120120
}}
121121
>
122122
<RocketLaunchIcon
123-
className={`w-4 h-4 absolute left-0 right-0 top-[1px] m-auto cursor-pointer ${
123+
className={`absolute inset-x-0 top-px m-auto h-4 w-4 cursor-pointer ${
124124
"text-" + getCalendarElementColor(date, currentMonth)
125125
}`}
126126
/>
@@ -134,18 +134,18 @@ export default function Calendar({
134134

135135
<Legend />
136136
</div>
137-
<div className="h-full w-full flex flex-col justify-between p-6">
137+
<div className="flex h-full w-full flex-col justify-between p-6">
138138
<div>
139-
<h1 className="text-lg font-semibold pb-3">{selectedDate}</h1>
139+
<h1 className="pb-3 text-lg font-semibold">{selectedDate}</h1>
140140
<div className="max-[1500px]:w-[90px] max-[1470px]:w-full">
141141
{getDayLabel() ? (
142-
<p className="rounded-lg bg-primary-content p-3 text-base font-medium w-full">
142+
<p className="w-full rounded-lg bg-primary-content p-3 text-base font-medium">
143143
{getDayLabel()}
144144
</p>
145145
) : null}
146146
{selectedDate && selectedSprint ? (
147147
<p
148-
className={`rounded-lg bg-primary-content p-3 text-base font-medium w-full ${
148+
className={`w-full rounded-lg bg-primary-content p-3 text-base font-medium ${
149149
getDayLabel() ? "mt-4" : ""
150150
}`}
151151
>
@@ -176,7 +176,7 @@ export default function Calendar({
176176
</div>
177177
</div>
178178
<Button
179-
className={`self-end p-1 h-[27px] mt-4 rounded text-base font-medium hover:bg-neutral ${
179+
className={`mt-4 h-[27px] self-end rounded p-1 text-base font-medium hover:bg-neutral ${
180180
isSameDay(selectDate, userDate) ? "bg-primary" : "bg-neutral-focus"
181181
}`}
182182
onClick={() => {

src/app/(main)/dashboard/components/Calendar/components/Cell.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function Cell({
2626
return (
2727
<div
2828
key={getUnixTime(date)}
29-
className="text-center h-[52px] grid place-content-center text-sm border border-base-100 relative"
29+
className="relative grid h-[52px] place-content-center border border-base-100 text-center text-sm"
3030
>
3131
<h1
3232
className={cn(generateClassString(date, currentMonth, today))}

src/app/(main)/dashboard/components/Calendar/components/Dot.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ type DotProps = {
88
function Dot({ color = "bg-neutral-content", onClick }: DotProps) {
99
return (
1010
<div
11-
className={`w-2 h-2 ${
11+
className={`h-2 w-2 ${
1212
"bg-" + color
13-
} rounded-full left-0 right-0 bottom-[6px] m-auto absolute cursor-pointer`}
13+
} absolute inset-x-0 bottom-[6px] m-auto cursor-pointer rounded-full`}
1414
onClick={onClick}
1515
/>
1616
);

0 commit comments

Comments
 (0)