Skip to content

Commit

Permalink
chore: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kohei Asai committed Feb 25, 2024
1 parent 05fd4b3 commit d6bcc4f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/app/images/[url]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface RouteParams {

async function GET(
request: NextRequest,
{ params: { url } }: { params: RouteParams }
{ params: { url } }: { params: RouteParams },
): Promise<Response> {
const config = getConfig();
const token = request.nextUrl.searchParams.get("token");
Expand Down
6 changes: 3 additions & 3 deletions src/app/opengraph-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const contentType = "image/png";

async function getCardCharacters(): Promise<Buffer> {
const buffer = await promisify(readFile)(
resolve(fileURLToPath(import.meta.url), "../../assets/card-characters.ttf")
resolve(fileURLToPath(import.meta.url), "../../assets/card-characters.ttf"),
);

return buffer as never;
Expand All @@ -26,7 +26,7 @@ async function getCardCharacters(): Promise<Buffer> {
async function getChaosDataUri(): Promise<string> {
const svg = await promisify(readFile)(
resolve(fileURLToPath(import.meta.url), "../../assets/chaos.svg"),
"utf8"
"utf8",
);

return `data:image/svg+xml,${encodeURIComponent(svg)}`;
Expand Down Expand Up @@ -74,7 +74,7 @@ async function Image(): Promise<Response> {
weight: 400,
},
],
}
},
);
}

Expand Down
12 changes: 6 additions & 6 deletions src/app/posts/[slug]/opengraph-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ async function getNotoSansJpSemiBold(): Promise<ArrayBuffer> {
const buffer = await promisify(readFile)(
resolve(
fileURLToPath(import.meta.url),
"../../../../assets/noto-sans-jp-semibold.ttf"
)
"../../../../assets/noto-sans-jp-semibold.ttf",
),
);

return buffer;
Expand All @@ -36,8 +36,8 @@ async function getCardCharacters(): Promise<ArrayBuffer> {
const buffer = await promisify(readFile)(
resolve(
fileURLToPath(import.meta.url),
"../../../../assets/card-characters.ttf"
)
"../../../../assets/card-characters.ttf",
),
);

return buffer;
Expand All @@ -46,7 +46,7 @@ async function getCardCharacters(): Promise<ArrayBuffer> {
async function getChaosDataUri(): Promise<string> {
const svg = await promisify(readFile)(
resolve(fileURLToPath(import.meta.url), "../../../../assets/chaos.svg"),
"utf8"
"utf8",
);

return `data:image/svg+xml,${encodeURIComponent(svg)}`;
Expand Down Expand Up @@ -144,7 +144,7 @@ async function Image({
weight: 400,
},
],
}
},
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/code-block/copy-button.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const CopyButton = forwardRef<
>(
(
{ loadingChildren, doneChildren, value, className, children, ...props },
ref
ref,
) => {
const action = useCallback(() => {
return globalThis.navigator.clipboard.writeText(value);
Expand All @@ -42,7 +42,7 @@ const CopyButton = forwardRef<
{children}
</ActionButton>
);
}
},
);

CopyButton.displayName = "CopyButton";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const TwoColumnLayoutAside = forwardRef<
>(
(
{ openButtonLabel, closeButtonLabel, className, children, ...props },
ref
ref,
) => {
const [open, setOpen] = useState(false);

Expand Down Expand Up @@ -52,7 +52,7 @@ const TwoColumnLayoutAside = forwardRef<
</Button>
</>
);
}
},
);

TwoColumnLayoutAside.displayName = "TwoColumnLayoutAside";
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/remark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function remarkHeadingId(): (tree: MdastRoot) => Promise<void> {
(node.data as any).hProperties ??= {};
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any, unicorn/consistent-destructuring
(node.data as any).hProperties.id = id;
})
}),
);
}

Expand Down Expand Up @@ -78,7 +78,7 @@ function rehypeOutline(this: Processor): void {
] as never,
(node) => {
headingNodes.push(node);
}
},
);

const outline: OutlineNode[] = [];
Expand All @@ -91,7 +91,7 @@ function rehypeOutline(this: Processor): void {
promises.push(
getHeadingId({ textContent, depth }).then((id) => {
outline.push({ id, depth, label: textContent });
})
}),
);
}

Expand Down

0 comments on commit d6bcc4f

Please sign in to comment.