Skip to content

Commit

Permalink
chore: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
twlite committed Dec 13, 2024
1 parent 52d8719 commit 1f4a5c5
Show file tree
Hide file tree
Showing 21 changed files with 523 additions and 502 deletions.
14 changes: 7 additions & 7 deletions apps/docs/cli.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"aliases": {
"cn": "./lib/utils.ts",
"componentsDir": "./components",
"uiDir": "./components/ui",
"libDir": "./lib"
}
}
"aliases": {
"cn": "./lib/utils.ts",
"componentsDir": "./components",
"uiDir": "./components/ui",
"libDir": "./lib"
}
}
2 changes: 1 addition & 1 deletion apps/docs/components/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const Accordions = forwardRef<
| Omit<AccordionMultipleProps, 'value' | 'onValueChange'>
>(({ type = 'single', className, defaultValue, ...props }, ref) => {
const [value, setValue] = useState<string | string[]>(
type === 'single' ? (defaultValue ?? '') : (defaultValue ?? []),
type === 'single' ? defaultValue ?? '' : defaultValue ?? [],
);

useEffect(() => {
Expand Down
4 changes: 3 additions & 1 deletion apps/docs/components/banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export function Banner({
>
{changeLayout && open ? (
<style>{`
:root:not(.${globalKey ?? 'nd-banner-never'}) { --fd-banner-height: 3rem; }
:root:not(.${
globalKey ?? 'nd-banner-never'
}) { --fd-banner-height: 3rem; }
`}</style>
) : null}
{globalKey ? (
Expand Down
6 changes: 1 addition & 5 deletions apps/docs/components/codeblock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ import {
useRef,
} from 'react';
import { cn } from '../lib/cn';
import {
ScrollArea,
ScrollBar,
ScrollViewport,
} from './ui/scroll-area';
import { ScrollArea, ScrollBar, ScrollViewport } from './ui/scroll-area';
import { useCopyButton } from '../lib/use-copy-button';
import { buttonVariants } from './ui/button';
import type { ScrollAreaViewportProps } from '@radix-ui/react-scroll-area';
Expand Down
6 changes: 1 addition & 5 deletions apps/docs/components/docs.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import {
import { usePathname } from 'next/navigation';
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
import { cn } from '../lib/cn';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from './ui/popover';
import { Popover, PopoverContent, PopoverTrigger } from './ui/popover';
import { BaseLinkItem, type LinkItemType } from './links';
import {
Collapsible,
Expand Down
16 changes: 3 additions & 13 deletions apps/docs/components/docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,17 @@ import {
SidebarPageTree,
} from './docs/sidebar';
import { replaceOrDefault, type SharedNavProps } from './shared';
import {
type LinkItemType,
type IconItemType,
BaseLinkItem,
} from './links';
import { type LinkItemType, type IconItemType, BaseLinkItem } from './links';
import { getSidebarTabs, type TabOptions } from '../lib/get-sidebar-tabs';
import { RootToggle } from './layout/root-toggle';
import { type BaseLayoutProps, getLinks } from './shared';
import {
LanguageToggle,
LanguageToggleText,
} from './layout/language-toggle';
import { LanguageToggle, LanguageToggleText } from './layout/language-toggle';
import { LayoutBody, LinksMenu } from './docs.client';
import { TreeContextProvider } from 'fumadocs-ui/provider';
import { NavProvider, Title } from './layout/nav';
import { ThemeToggle } from './layout/theme-toggle';
import { Navbar, NavbarSidebarTrigger } from './docs/navbar';
import {
LargeSearchToggle,
SearchToggle,
} from './layout/search-toggle';
import { LargeSearchToggle, SearchToggle } from './layout/search-toggle';
import { SearchOnly } from 'fumadocs-ui/provider';
import {
getSidebarTabsFromOptions,
Expand Down
10 changes: 2 additions & 8 deletions apps/docs/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@ import {
NavbarMenuTrigger,
} from './home/navbar';
import { type LinkItemType } from './links';
import {
LargeSearchToggle,
SearchToggle,
} from './layout/search-toggle';
import { LargeSearchToggle, SearchToggle } from './layout/search-toggle';
import { ThemeToggle } from './layout/theme-toggle';
import {
LanguageToggle,
LanguageToggleText,
} from './layout/language-toggle';
import { LanguageToggle, LanguageToggleText } from './layout/language-toggle';
import { ChevronDown, Languages } from 'lucide-react';
import { buttonVariants } from './ui/button';
import { SearchOnly } from 'fumadocs-ui/provider';
Expand Down
11 changes: 3 additions & 8 deletions apps/docs/components/layout/language-toggle.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
'use client';
import { type ButtonHTMLAttributes, type HTMLAttributes } from 'react';
import { useI18n } from 'fumadocs-ui/provider';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '../ui/popover';
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';
import { cn } from '../../lib/cn';
import { buttonVariants } from '../ui/button';

Expand Down Expand Up @@ -60,9 +56,8 @@ export function LanguageToggleText(
props: HTMLAttributes<HTMLSpanElement>,
): React.ReactElement {
const context = useI18n();
const text = context.locales?.find(
(item) => item.locale === context.locale,
)?.name;
const text = context.locales?.find((item) => item.locale === context.locale)
?.name;

return <span {...props}>{text}</span>;
}
6 changes: 1 addition & 5 deletions apps/docs/components/layout/toc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ import { cn } from '../../lib/cn';
import { useI18n } from 'fumadocs-ui/provider';
import { TocThumb } from './toc-thumb';
import { ScrollArea, ScrollViewport } from '../ui/scroll-area';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '../ui/popover';
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';
import type {
PopoverContentProps,
PopoverTriggerProps,
Expand Down
4 changes: 3 additions & 1 deletion apps/docs/components/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ function EditOnGitHub({
path,
...props
}: EditOnGitHubOptions) {
const href = `https://github.com/${owner}/${repo}/blob/${sha}/${path.startsWith('/') ? path.slice(1) : path}`;
const href = `https://github.com/${owner}/${repo}/blob/${sha}/${
path.startsWith('/') ? path.slice(1) : path
}`;

return (
<a
Expand Down
6 changes: 1 addition & 5 deletions apps/docs/components/type-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import { InfoIcon } from 'lucide-react';
import Link from 'next/link';
import { cva } from 'class-variance-authority';
import { cn } from '../lib/cn';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from './ui/popover';
import { Popover, PopoverContent, PopoverTrigger } from './ui/popover';
import type { ReactNode } from 'react';

export function Info({ children }: { children: ReactNode }): ReactNode {
Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/guide/event-file-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ description: A simple overview of how to set up event functions.

# Events Setup


This is a simple overview of how to set up a simple function that is called when the "ready" event is triggered. All this code does is log to the console when the bot is ready.

<Tabs items={['CommonJS', 'ESM', 'TypeScript']} group="language" persist>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@
"tailwindcss": "^3.4.16",
"typescript": "^5.7.2"
}
}
}
Loading

0 comments on commit 1f4a5c5

Please sign in to comment.