Skip to content

Commit fb60725

Browse files
committed
chore: linting.
1 parent 5bf3322 commit fb60725

File tree

7 files changed

+11
-14
lines changed

7 files changed

+11
-14
lines changed

biome.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"files": {
1111
"includes": [
1212
"**",
13+
"!_context/**/*",
1314
"!**/dist/**/*",
1415
"!**/*.js",
1516
"!**/*.cjs",

dev/components/demos/base-demo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { Tabs } from "@kobalte/core/tabs"
33
import { useClipboard } from "bagon-hooks"
44
import { clsx } from "clsx"
5+
import { MDXContent } from "dev/components/mdx-content"
56
import {
67
type ComponentProps,
78
children,
@@ -15,7 +16,6 @@ import {
1516
splitProps,
1617
} from "solid-js"
1718
import { cn } from "@/utils/cn"
18-
import { MDXContent } from "dev/components/mdx-content"
1919

2020
// TODO: Dropdown (use @kobalte)
2121
// Dropdown

dev/components/demos/isolate.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Demo, { DemoSwitch, type DemoProps } from "dev/components/demos/base-demo"
1+
import Demo, { type DemoProps, DemoSwitch } from "dev/components/demos/base-demo"
22
import { createSignal } from "solid-js"
33
import NumberFlow from "src"
44

@@ -28,7 +28,7 @@ export default function IsolateDemo(props: Omit<DemoProps, "children" | "code">)
2828
onClick={() => setIncreased((o) => !o)}
2929
>
3030
<div class="~text-3xl/4xl flex items-center gap-4">
31-
{increased() && <div class="bg-zinc-800 ~w-20/40 h-[1em] rounded-sm" />}
31+
{increased() && <div class="~w-20/40 h-[1em] rounded-sm bg-zinc-800" />}
3232
<NumberFlow
3333
locales="en-US"
3434
isolate={isolate()}

dev/components/demos/styling.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ number-flow::part(suffix) {
2525
value={value()}
2626
format={{ style: "currency", currency: "USD", trailingZeroDisplay: "stripIfInteger" }}
2727
suffix="/mo"
28-
class="~text-3xl/4xl font-semibold text-4xl part-[suffix]:font-normal part-[suffix]:text-muted part-[suffix]:text-[0.75em] part-[suffix]:ml-[0.0625em]"
28+
class="~text-3xl/4xl part-[suffix]:ml-[0.0625em] font-semibold part-[suffix]:font-normal part-[suffix]:text-[0.75em] part-[suffix]:text-muted text-4xl"
2929
style={{ "--number-flow-char-height": "0.85em" }}
3030
/>
3131
</Demo>

dev/components/demos/tabular-nums.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Demo, { DemoSwitch, type DemoProps } from "dev/components/demos/base-demo"
1+
import Demo, { type DemoProps, DemoSwitch } from "dev/components/demos/base-demo"
22
import { createSignal } from "solid-js"
33
import NumberFlow from "src"
44

dev/components/demos/trend.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default function TrendDemo(props: Omit<DemoProps, "children" | "code">) {
4040
code={code}
4141
title={
4242
<DropdownMenu>
43-
<DropdownMenuTrigger class="flex items-center gap-1 rounded-md px-2 py-1 text-xs hover:bg-zinc-800 transition-colors outline-none">
43+
<DropdownMenuTrigger class="flex items-center gap-1 rounded-md px-2 py-1 text-xs outline-none transition-colors hover:bg-zinc-800">
4444
<code class="text-muted text-zinc-500">trend:</code>
4545
<code class="font-semibold">{option()}</code>
4646
<svg

dev/components/mdx-content.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { compile, compileSync, run, runSync } from "@mdx-js/mdx"
2+
import rehypeShiki from "@shikijs/rehype"
23
import theme from "dev/highlighter-theme.json"
34
import { getSingletonHighlighter } from "shiki"
45
import { createEffect, createRenderEffect, createSignal, type JSX, Show } from "solid-js"
56
import { Dynamic } from "solid-js/web"
67
import * as runtime from "solid-jsx"
78

8-
9-
import rehypeShiki from "@shikijs/rehype"
10-
119
interface MDXProps {
1210
code: string
1311
components?: Record<string, any>
@@ -90,9 +88,9 @@ export const MDXContent = (props: MDXProps): JSX.Element => {
9088
rehypePlugins: [
9189
[
9290
rehypeShiki, // Adds syntax-highlighting for code blocks.
93-
{ theme: theme }
94-
]
95-
]
91+
{ theme: theme },
92+
],
93+
],
9694
})
9795
setMdxModule(await run(String(compiled), { ...(runtime as any), baseUrl: import.meta.url }))
9896
} catch (e) {
@@ -112,7 +110,6 @@ export const MDXContent = (props: MDXProps): JSX.Element => {
112110
const Content = () => mdxModule()?.default || (() => null)
113111

114112
return Content as unknown as JSX.Element
115-
116113
}
117114

118115
// export const MDXContent = (props: MDXProps): JSX.Element => {
@@ -129,7 +126,6 @@ export const MDXContent = (props: MDXProps): JSX.Element => {
129126
// return Content as unknown as JSX.Element
130127
// }
131128

132-
133129
export const MDXContentStatic = (props: MDXProps): JSX.Element => {
134130
try {
135131
const compiled = compileSync(props.code, {

0 commit comments

Comments
 (0)