Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jonluca committed Oct 30, 2023
1 parent 8a3ac0b commit dce9f02
Show file tree
Hide file tree
Showing 38 changed files with 138 additions and 130 deletions.
8 changes: 4 additions & 4 deletions docs/app/api/og/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { ogImageSchema } from '@/lib/validations/og'
export const runtime = 'edge'

const photo = fetch(new URL(`../../../public/logo.jpg`, import.meta.url)).then(
(res) => res.arrayBuffer()
(res) => res.arrayBuffer(),
)

const ranadeRegular = fetch(
new URL('../../../assets/fonts/Ranade-Regular.ttf', import.meta.url)
new URL('../../../assets/fonts/Ranade-Regular.ttf', import.meta.url),
).then((res) => res.arrayBuffer())

const satoshiBold = fetch(
new URL('../../../assets/fonts/Satoshi-Bold.ttf', import.meta.url)
new URL('../../../assets/fonts/Satoshi-Bold.ttf', import.meta.url),
).then((res) => res.arrayBuffer())

export async function GET(req: Request) {
Expand Down Expand Up @@ -121,7 +121,7 @@ export async function GET(req: Request) {
style: 'normal',
},
],
}
},
)
} catch (error) {
return new Response(`Failed to generate image`, {
Expand Down
2 changes: 1 addition & 1 deletion docs/app/components/CodeCopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const CodeCopyButton: FC<CodeCopyButtonProps> = ({ children }) => {
copied,
'border border-gray-950 dark:border-neutral-300 hover:dark:bg-black bg-inherit rounded-lg p-2 hover:cursor-pointer':
!copied,
}
},
)}
>
<code lang="en">{children}</code>
Expand Down
2 changes: 1 addition & 1 deletion docs/app/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ThemeToggle } from './ThemeToggle'
import { buttonVariants } from './blocks/Button'
import SocialIcons from './blocks/SocialIcons'

const Navbar = async () => {
const Navbar = () => {
return (
<div className="fixed backdrop-blur-sm bg-neutral-200 dark:bg-slate-900 z-50 top-0 left-0 right-0 h-20 border-b border-slate-300 dark:border-slate-700 shadow-sm flex items-center justify-between">
<div className="container max-w-7xl mx-auto w-full flex justify-between items-center font-satoshiBold">
Expand Down
4 changes: 2 additions & 2 deletions docs/app/components/blocks/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const buttonVariants = cva(
variant: 'default',
size: 'default',
},
}
},
)

export interface ButtonProps
Expand All @@ -52,7 +52,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
{children}
</button>
)
}
},
)
Button.displayName = 'Button'

Expand Down
18 changes: 9 additions & 9 deletions docs/app/components/blocks/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
className={cn(
'flex cursor-default select-none items-center rounded-sm py-1.5 px-2 text-sm font-medium outline-none focus:bg-neutral-200 data-[state=open]:bg-slate-100 dark:focus:bg-slate-700 dark:data-[state=open]:bg-slate-700',
inset && 'pl-8',
className
className,
)}
{...props}
>
Expand All @@ -48,7 +48,7 @@ const DropdownMenuSubContent = React.forwardRef<
ref={ref}
className={cn(
'z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-neutral-200 p-1 text-slate-700 shadow-md animate-in slide-in-from-left-1 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400',
className
className,
)}
{...props}
/>
Expand All @@ -66,7 +66,7 @@ const DropdownMenuContent = React.forwardRef<
sideOffset={sideOffset}
className={cn(
'z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-neutral-200 p-1 text-slate-700 shadow-md animate-in data-[side=right]:slide-in-from-left-2 data-[side=left]:slide-in-from-right-2 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400',
className
className,
)}
{...props}
/>
Expand All @@ -85,7 +85,7 @@ const DropdownMenuItem = React.forwardRef<
className={cn(
'relative flex cursor-default text-base md:text-sm select-none items-center rounded-sm py-1.5 px-2 font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-700',
inset && 'pl-8',
className
className,
)}
{...props}
/>
Expand All @@ -100,7 +100,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
ref={ref}
className={cn(
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-neutral-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-700',
className
className,
)}
checked={checked}
{...props}
Expand All @@ -124,7 +124,7 @@ const DropdownMenuRadioItem = React.forwardRef<
ref={ref}
className={cn(
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-neutral-300 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-700',
className
className,
)}
{...props}
>
Expand All @@ -149,7 +149,7 @@ const DropdownMenuLabel = React.forwardRef<
className={cn(
'px-2 py-1.5 text-sm font-satoshiMedium text-slate-900 dark:text-slate-300',
inset && 'pl-8',
className
className,
)}
{...props}
/>
Expand All @@ -164,7 +164,7 @@ const DropdownMenuSeparator = React.forwardRef<
ref={ref}
className={cn(
'-mx-1 my-1 h-px bg-neutral-300 dark:bg-slate-700',
className
className,
)}
{...props}
/>
Expand All @@ -179,7 +179,7 @@ const DropdownMenuShortcut = ({
<span
className={cn(
'ml-auto text-xs tracking-widest text-slate-500',
className
className,
)}
{...props}
/>
Expand Down
2 changes: 1 addition & 1 deletion docs/app/components/callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function Callout({
{
'border-red-900 bg-red-50': type === 'danger',
'border-yellow-900 bg-yellow-50': type === 'warning',
}
},
)}
{...props}
>
Expand Down
2 changes: 1 addition & 1 deletion docs/app/components/mdx-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function MdxCard({
className={cn(
'group relative rounded-lg border p-6 shadow-md transition-shadow hover:shadow-lg',
disabled && 'cursor-not-allowed opacity-60',
className
className,
)}
{...props}
>
Expand Down
26 changes: 13 additions & 13 deletions docs/app/components/mdx-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const components = {
<h1
className={cn(
'mt-2 scroll-m-20 text-4xl font-satoshiBold tracking-tight',
className
className,
)}
{...props}
/>
Expand All @@ -21,7 +21,7 @@ const components = {
<h2
className={cn(
'mt-10 scroll-m-20 border-b border-slate-800 dark:border-neutral-300 pb-1 text-3xl font-satoshiMedium tracking-tight first:mt-0',
className
className,
)}
{...props}
/>
Expand All @@ -30,7 +30,7 @@ const components = {
<h3
className={cn(
'mt-8 scroll-m-20 text-2xl font-satoshiMedium tracking-tight',
className
className,
)}
{...props}
/>
Expand All @@ -39,7 +39,7 @@ const components = {
<h4
className={cn(
'mt-8 scroll-m-20 text-xl font-satoshiMedium tracking-tight',
className
className,
)}
{...props}
/>
Expand All @@ -48,7 +48,7 @@ const components = {
<h5
className={cn(
'mt-8 scroll-m-20 text-lg font-satoshiMedium tracking-tight',
className
className,
)}
{...props}
/>
Expand All @@ -57,7 +57,7 @@ const components = {
<h6
className={cn(
'mt-8 scroll-m-20 text-base font-satoshiMedium tracking-tight',
className
className,
)}
{...props}
/>
Expand All @@ -72,7 +72,7 @@ const components = {
<p
className={cn(
'leading-7 [&:not(:first-child)]:mt-6 font-ranadeRegular',
className
className,
)}
{...props}
/>
Expand All @@ -96,7 +96,7 @@ const components = {
<blockquote
className={cn(
'mt-6 border-l-2 pl-6 [&>*]:text-muted-foreground',
className
className,
)}
{...props}
/>
Expand All @@ -119,7 +119,7 @@ const components = {
<tr
className={cn(
'm-0 border-t p-0 even:bg-neutral-300 dark:even:bg-slate-950',
className
className,
)}
{...props}
/>
Expand All @@ -128,7 +128,7 @@ const components = {
<th
className={cn(
'border border-slate-800 dark:border-neutral-300 px-4 py-2 text-left font-satoshiBold [&[align=center]]:text-center [&[align=right]]:text-right',
className
className,
)}
{...props}
/>
Expand All @@ -137,7 +137,7 @@ const components = {
<td
className={cn(
'border border-slate-800 dark:border-neutral-300 px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right',
className
className,
)}
{...props}
/>
Expand All @@ -146,7 +146,7 @@ const components = {
<pre
className={cn(
'mb-4 mt-6 overflow-x-auto rounded-lg border bg-black py-4',
className
className,
)}
{...props}
/>
Expand All @@ -161,7 +161,7 @@ const components = {
<code
className={cn(
'relative rounded border px-[0.3rem] py-[0.2rem] font-mono text-sm bg-gray-950 text-neutral-300 border-blue-500',
className
className,
)}
{...props}
/>
Expand Down
2 changes: 1 addition & 1 deletion docs/app/components/pager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function DocsPager({ doc }: DocsPagerProps) {
export function getPagerForDoc(doc: Doc) {
const flattenedLinks = [null, ...flatten(docsConfig.sidebarNav), null]
const activeIndex = flattenedLinks.findIndex(
(link) => doc.slug === link?.href
(link) => doc.slug === link?.href,
)
const prev = activeIndex !== 0 ? flattenedLinks[activeIndex - 1] : null
const next =
Expand Down
4 changes: 2 additions & 2 deletions docs/app/components/sidebar-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function DocsSidebarNavItems({
{
'bg-neutral-300 text-blue-600 dark:bg-slate-800 dark:text-indigo-300':
pathname === item.href,
}
},
)}
target={item.external ? '_blank' : ''}
rel={item.external ? 'noreferrer' : ''}
Expand All @@ -67,7 +67,7 @@ export function DocsSidebarNavItems({
>
{item.title}
</span>
)
),
)}
</div>
) : null
Expand Down
6 changes: 3 additions & 3 deletions docs/app/components/toc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function DashboardTableOfContents({ toc }: TocProps) {
.filter(Boolean)
.map((id) => id?.split('#')[1])
: [],
[toc]
[toc],
)
const activeHeading = useActiveItem(itemIds)
const mounted = useMounted()
Expand Down Expand Up @@ -49,7 +49,7 @@ function useActiveItem(itemIds: (string | undefined)[]) {
}
})
},
{ rootMargin: `0% 0% -80% 0%` }
{ rootMargin: `0% 0% -80% 0%` },
)

itemIds?.forEach((id) => {
Expand Down Expand Up @@ -98,7 +98,7 @@ function Tree({ tree, level = 1, activeItem }: TreeProps) {
'inline-block no-underline font-ranadeRegular',
item.url === `#${activeItem}`
? 'font-medium text-blue-500'
: 'text-sm text-slate-400'
: 'text-sm text-slate-400',
)}
>
{item.title}
Expand Down
8 changes: 4 additions & 4 deletions docs/app/components/ui/toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ToastViewport = React.forwardRef<
ref={ref}
className={cn(
'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]',
className
className,
)}
{...props}
/>
Expand All @@ -35,7 +35,7 @@ const toastVariants = cva(
defaultVariants: {
variant: 'default',
},
}
},
)

const Toast = React.forwardRef<
Expand All @@ -61,7 +61,7 @@ const ToastAction = React.forwardRef<
ref={ref}
className={cn(
'inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-destructive/30 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive',
className
className,
)}
{...props}
/>
Expand All @@ -76,7 +76,7 @@ const ToastClose = React.forwardRef<
ref={ref}
className={cn(
'absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',
className
className,
)}
toast-close=""
{...props}
Expand Down
4 changes: 2 additions & 2 deletions docs/app/components/ui/use-toast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const reducer = (state: State, action: Action): State => {
return {
...state,
toasts: state.toasts.map((t) =>
t.id === action.toast.id ? { ...t, ...action.toast } : t
t.id === action.toast.id ? { ...t, ...action.toast } : t,
),
}

Expand All @@ -106,7 +106,7 @@ export const reducer = (state: State, action: Action): State => {
...t,
open: false,
}
: t
: t,
),
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function getGitHubStars(): Promise<string | null> {
Accept: 'application/vnd.github+json',
Authorization: `Bearer ${process.env.GITHUB_ACCESS_TOKEN}`,
},
}
},
)

if (!response?.ok) {
Expand Down
Loading

0 comments on commit dce9f02

Please sign in to comment.