Skip to content

Commit 1702805

Browse files
committed
migrate to biome
1 parent cc3cf92 commit 1702805

File tree

167 files changed

+1265
-1231
lines changed

Some content is hidden

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

167 files changed

+1265
-1231
lines changed

app/api/ai/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { NextRequest, NextResponse } from 'next/server';
1+
import { type NextRequest, NextResponse } from 'next/server';
22
import type { Session } from 'next-auth';
33

44
import { auth } from '@/auth';
55
import { signedFetch } from '@/lib/signed-fetch';
66

77
export type AuthRequest = NextRequest & { auth: Session | null };
88

9-
export const POST = auth(async function POST(req: AuthRequest, { params }) {
9+
export const POST = auth(async function POST(_req: AuthRequest, { params }) {
1010
const { login } = await params;
1111

1212
const response = await signedFetch('/user/generate-description', {

app/api/badge/[login]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { notFound } from 'next/navigation';
2-
import { NextRequest } from 'next/server';
2+
import type { NextRequest } from 'next/server';
33

44
import { BadgeTemplateType } from '@/badge/badge.types';
55
import { BadgeZodSchema } from '@/badge/badge.zod';

app/api/badge/v2/[login]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { notFound } from 'next/navigation';
2-
import { NextRequest } from 'next/server';
2+
import type { NextRequest } from 'next/server';
33

44
import { BadgeV2ZodSchema } from '@/badge/badge.zod';
55
import { renderInlineBadge } from '@/badge/templates/inline/inline.render';

app/api/graphql/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NextRequest, NextResponse } from 'next/server';
1+
import { type NextRequest, NextResponse } from 'next/server';
22

33
import { request } from '@/lib/graphql/request';
44
import { rejectNotAllowedGraphqlOperations } from '@/utils/reject-not-allowed-graphql-operations';

app/api/profile/[login]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NextRequest, NextResponse } from 'next/server';
1+
import { type NextRequest, NextResponse } from 'next/server';
22
import type { Session } from 'next-auth';
33

44
import { auth } from '@/auth';

app/badge/builder/[[...login]]/components/badge-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import { zodResolver } from '@hookform/resolvers/zod';
44
import { useQueryStates } from 'nuqs';
5-
import { FC, PropsWithChildren, useEffect } from 'react';
5+
import { type FC, type PropsWithChildren, useEffect } from 'react';
66
import { useForm } from 'react-hook-form';
77
import { useDebounceCallback } from 'usehooks-ts';
8-
import { z } from 'zod';
8+
import type { z } from 'zod';
99

1010
import { RANK_NAME } from '@/badge/badge.consts';
1111
import { BadgeNuqsSchema } from '@/badge/badge.nuqs';

app/badge/builder/[[...login]]/components/color-picker-field.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { hsvaToHex, hexToHsva } from '@uiw/color-convert';
1+
import { hexToHsva, hsvaToHex } from '@uiw/color-convert';
22
import Colorful from '@uiw/react-color-colorful';
33
import { useEffect, useMemo, useState } from 'react';
4-
import { useFormContext, useController } from 'react-hook-form';
4+
import { useController, useFormContext } from 'react-hook-form';
55

66
import { isValidHex } from '@/badge/utils/is-valid-hex';
7-
import { FormItem, FormLabel, FormControl, FormMessage } from '@/components/ui/form';
7+
import { FormControl, FormItem, FormLabel, FormMessage } from '@/components/ui/form';
88
import { Input } from '@/components/ui/input';
9-
import { Popover, PopoverTrigger, PopoverContent } from '@/components/ui/popover';
9+
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
1010
import { cn } from '@/lib/utils';
1111

1212
type Props = {

app/badge/builder/[[...login]]/components/integration-code.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
'use client';
22

33
import { Check, Clipboard } from 'lucide-react';
4-
import { FC, useRef, useState } from 'react';
4+
import { type FC, useRef, useState } from 'react';
55

66
import { Button } from '@/components/ui/button';
77
import { Textarea } from '@/components/ui/textarea';
8-
9-
import { LoginFormProps } from './login-form.types';
10-
import { StepTitle } from './step-title';
118
import { useBadgeUrl } from '../hooks/useBadgeUrl';
9+
import type { LoginFormProps } from './login-form.types';
10+
import { StepTitle } from './step-title';
1211

1312
export const IntegrationCode: FC<LoginFormProps> = ({ githubLogin, githubId }) => {
1413
const url = useBadgeUrl(githubLogin, githubId);

app/badge/builder/[[...login]]/components/login-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import { Edit, Search } from 'lucide-react';
55
import type { Route } from 'next';
66
import Link from 'next/link';
77
import { useRouter, useSearchParams } from 'next/navigation';
8-
import { FC } from 'react';
8+
import type { FC } from 'react';
99
import { useForm } from 'react-hook-form';
1010
import { z } from 'zod';
1111

1212
import { Button } from '@/components/ui/button';
1313
import { Form, FormField, FormItem, FormMessage } from '@/components/ui/form';
1414
import { Input } from '@/components/ui/input';
1515

16-
import { LoginFormProps } from './login-form.types';
16+
import type { LoginFormProps } from './login-form.types';
1717
import { StepTitle } from './step-title';
1818

1919
const FormSchema = z.object({

app/badge/builder/[[...login]]/components/preview.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
'use client';
22

3-
import { FC } from 'react';
3+
import type { FC } from 'react';
44

55
import { Link } from '@/components/link/link';
6-
7-
import { LoginFormProps } from './login-form.types';
86
import { useBadgeUrl } from '../hooks/useBadgeUrl';
7+
import type { LoginFormProps } from './login-form.types';
98

109
export const Preview: FC<LoginFormProps> = ({ githubLogin, githubId }) => {
1110
const url = useBadgeUrl(githubLogin, githubId);

0 commit comments

Comments
 (0)