Skip to content

Commit b41648c

Browse files
authored
feat(package): add and configure prettier
Merge pull request #7 from ruru-m07/code/format
2 parents 6edae64 + d1f1cf5 commit b41648c

24 files changed

+273
-263
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ Please provide some steps for the reviewer to test your change. If you have wrot
4747
- ✅ Provide tests for your changes.
4848
- 📝 Use descriptive commit messages.
4949
- 📗 Update any related documentation and include any relevant screenshots.
50-
-->
50+
-->

CODE_OF_CONDUCT.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112112
**Consequence**: A permanent ban from any sort of public interaction within

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ We respect your privacy and are committed to protecting it. Any personal informa
3232

3333
By contributing to this project, you agree to license your contributions under the [project's license](https://github.com/cocola-dev/cocola/blob/main/LICENSE).
3434

35-
Thank you for your contribution!
35+
Thank you for your contribution!

action/index.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
"use server";
22

33
import { model, systemHistory } from "@/utils";
4-
import {
5-
Content,
6-
} from "@google/generative-ai";
4+
import { Content } from "@google/generative-ai";
75

86
export const commitMessage = async ({
97
message,
@@ -12,12 +10,8 @@ export const commitMessage = async ({
1210
message: string;
1311
history: Content[];
1412
}) => {
15-
1613
const chat = model.startChat({
17-
history: [
18-
...await systemHistory(),
19-
...history,
20-
],
14+
history: [...(await systemHistory()), ...history],
2115
});
2216

2317
try {

components.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
"components": "@/components",
1515
"utils": "@/lib/utils"
1616
}
17-
}
17+
}

components/Navbar.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const Navbar = () => {
1818
variant: "outline",
1919
size: "icon",
2020
className: "rounded-full w-10 h-10",
21-
})
21+
}),
2222
)}
2323
>
2424
<GitHubLogoIcon className="w-6 h-6" />
@@ -34,7 +34,7 @@ const Navbar = () => {
3434
variant: "outline",
3535
size: "icon",
3636
className: "rounded-full w-10 h-10",
37-
})
37+
}),
3838
)}
3939
/>
4040
</div>
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
"use client"
1+
"use client";
22

3-
import * as React from "react"
4-
import { ThemeProvider as NextThemesProvider } from "next-themes"
5-
import { type ThemeProviderProps } from "next-themes/dist/types"
3+
import * as React from "react";
4+
import { ThemeProvider as NextThemesProvider } from "next-themes";
5+
import { type ThemeProviderProps } from "next-themes/dist/types";
66

77
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
8-
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
8+
return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
99
}

components/ui/badge.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import * as React from "react"
2-
import { cva, type VariantProps } from "class-variance-authority"
1+
import * as React from "react";
2+
import { cva, type VariantProps } from "class-variance-authority";
33

4-
import { cn } from "@/lib/utils"
4+
import { cn } from "@/lib/utils";
55

66
const badgeVariants = cva(
77
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
@@ -20,8 +20,8 @@ const badgeVariants = cva(
2020
defaultVariants: {
2121
variant: "default",
2222
},
23-
}
24-
)
23+
},
24+
);
2525

2626
export interface BadgeProps
2727
extends React.HTMLAttributes<HTMLDivElement>,
@@ -30,7 +30,7 @@ export interface BadgeProps
3030
function Badge({ className, variant, ...props }: BadgeProps) {
3131
return (
3232
<div className={cn(badgeVariants({ variant }), className)} {...props} />
33-
)
33+
);
3434
}
3535

36-
export { Badge, badgeVariants }
36+
export { Badge, badgeVariants };

components/ui/button.tsx

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as React from "react"
2-
import { Slot } from "@radix-ui/react-slot"
3-
import { cva, type VariantProps } from "class-variance-authority"
1+
import * as React from "react";
2+
import { Slot } from "@radix-ui/react-slot";
3+
import { cva, type VariantProps } from "class-variance-authority";
44

5-
import { cn } from "@/lib/utils"
5+
import { cn } from "@/lib/utils";
66

77
const buttonVariants = cva(
88
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
@@ -31,27 +31,27 @@ const buttonVariants = cva(
3131
variant: "default",
3232
size: "default",
3333
},
34-
}
35-
)
34+
},
35+
);
3636

3737
export interface ButtonProps
3838
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
3939
VariantProps<typeof buttonVariants> {
40-
asChild?: boolean
40+
asChild?: boolean;
4141
}
4242

4343
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
4444
({ className, variant, size, asChild = false, ...props }, ref) => {
45-
const Comp = asChild ? Slot : "button"
45+
const Comp = asChild ? Slot : "button";
4646
return (
4747
<Comp
4848
className={cn(buttonVariants({ variant, size, className }))}
4949
ref={ref}
5050
{...props}
5151
/>
52-
)
53-
}
54-
)
55-
Button.displayName = "Button"
52+
);
53+
},
54+
);
55+
Button.displayName = "Button";
5656

57-
export { Button, buttonVariants }
57+
export { Button, buttonVariants };

components/ui/card.tsx

+23-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as React from "react"
1+
import * as React from "react";
22

3-
import { cn } from "@/lib/utils"
3+
import { cn } from "@/lib/utils";
44

55
const Card = React.forwardRef<
66
HTMLDivElement,
@@ -10,12 +10,12 @@ const Card = React.forwardRef<
1010
ref={ref}
1111
className={cn(
1212
"rounded-xl border bg-card text-card-foreground shadow",
13-
className
13+
className,
1414
)}
1515
{...props}
1616
/>
17-
))
18-
Card.displayName = "Card"
17+
));
18+
Card.displayName = "Card";
1919

2020
const CardHeader = React.forwardRef<
2121
HTMLDivElement,
@@ -26,8 +26,8 @@ const CardHeader = React.forwardRef<
2626
className={cn("flex flex-col space-y-1.5 p-6", className)}
2727
{...props}
2828
/>
29-
))
30-
CardHeader.displayName = "CardHeader"
29+
));
30+
CardHeader.displayName = "CardHeader";
3131

3232
const CardTitle = React.forwardRef<
3333
HTMLParagraphElement,
@@ -38,8 +38,8 @@ const CardTitle = React.forwardRef<
3838
className={cn("font-semibold leading-none tracking-tight", className)}
3939
{...props}
4040
/>
41-
))
42-
CardTitle.displayName = "CardTitle"
41+
));
42+
CardTitle.displayName = "CardTitle";
4343

4444
const CardDescription = React.forwardRef<
4545
HTMLParagraphElement,
@@ -50,16 +50,16 @@ const CardDescription = React.forwardRef<
5050
className={cn("text-sm text-muted-foreground", className)}
5151
{...props}
5252
/>
53-
))
54-
CardDescription.displayName = "CardDescription"
53+
));
54+
CardDescription.displayName = "CardDescription";
5555

5656
const CardContent = React.forwardRef<
5757
HTMLDivElement,
5858
React.HTMLAttributes<HTMLDivElement>
5959
>(({ className, ...props }, ref) => (
6060
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
61-
))
62-
CardContent.displayName = "CardContent"
61+
));
62+
CardContent.displayName = "CardContent";
6363

6464
const CardFooter = React.forwardRef<
6565
HTMLDivElement,
@@ -70,7 +70,14 @@ const CardFooter = React.forwardRef<
7070
className={cn("flex items-center p-6 pt-0", className)}
7171
{...props}
7272
/>
73-
))
74-
CardFooter.displayName = "CardFooter"
73+
));
74+
CardFooter.displayName = "CardFooter";
7575

76-
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
76+
export {
77+
Card,
78+
CardHeader,
79+
CardFooter,
80+
CardTitle,
81+
CardDescription,
82+
CardContent,
83+
};

components/ui/collapsible.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
"use client"
1+
"use client";
22

3-
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
3+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
44

5-
const Collapsible = CollapsiblePrimitive.Root
5+
const Collapsible = CollapsiblePrimitive.Root;
66

7-
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
7+
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
88

9-
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
9+
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
1010

11-
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
11+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };

0 commit comments

Comments
 (0)