Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions website/biome.json

This file was deleted.

40 changes: 40 additions & 0 deletions website/biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"includes": ["**"]
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"noParameterAssign": "error",
"useAsConstAssertion": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
}
Binary file modified website/bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "vitest"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@biomejs/biome": "2.0.6",
"@hono/ssg-plugins-essential": "^0.1.0",
"@hono/vite-dev-server": "^0.20.1",
"@hono/vite-ssg": "^0.2.0",
Expand Down
20 changes: 10 additions & 10 deletions website/src/components/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Tabler Icons
// https://tabler.io/icons
export { HomeIcon } from "./HomeIcon";

export { AlertTriangleIcon } from "./AlertTriangleIcon";
export { CaretRightCircleIcon } from "./CaretRightCircleIcon";
export { InfoCircleIcon } from "./InfoCircleIcon";
export { HelpCircleIcon } from "./HelpCircleIcon";
export { ChevronLeftIcon } from "./ChevronLeftIcon";
export { ChevronRightIcon } from "./ChevronRightIcon";
export { AlertTriangleIcon } from "./AlertTriangleIcon";
export { MenuIcon } from "./MenuIcon";
export { CloseIcon } from "./CloseIcon";
export { SearchIcon } from "./SearchIcon";
export { LanguageIcon } from "./LanguageIcon";
export { WorldIcon } from "./WorldIcon";

export { DiscordIcon } from "./DiscordIcon";
// Simple Icons
// https://simpleicons.org/
export { GitHubIcon } from "./GitHubIcon";
export { DiscordIcon } from "./DiscordIcon";
export { HelpCircleIcon } from "./HelpCircleIcon";
export { HomeIcon } from "./HomeIcon";
export { InfoCircleIcon } from "./InfoCircleIcon";
export { LanguageIcon } from "./LanguageIcon";
export { MenuIcon } from "./MenuIcon";
export { SearchIcon } from "./SearchIcon";
export { WorldIcon } from "./WorldIcon";
6 changes: 2 additions & 4 deletions website/src/components/templates/FuncTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,14 @@ function ScopedDefinitions({
{parent ? (
// Currently, the scope has at most two levels.
// Therefore, it is sufficient to only annotate the direct `parent`.
<>
<Translation translationKey="definitionOf" name={parent.name} />
</>
<Translation translationKey="definitionOf" name={parent.name} />
) : (
<Translation translationKey="definition" />
)}
<Tooltip kind="definitions" />
</h2>

{scope.map((method, index) => {
{scope.map((method, _index) => {
const methodId = `${parentId}definitions-${method.name}`;

return (
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/templates/GroupTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const GroupTemplate: FC<GroupTemplateProps> = ({
<>
<h2 id="functions">Function</h2>

{content.functions.map((method, index) => (
{content.functions.map((method, _index) => (
<div key={method.name}>
<h3 id={`functions-${method.name}`} class="method-head">
<code class="text-base font-medium">{method.name}</code>
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/templates/TypeTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const TypeTemplate: FC<TypeTemplateProps> = ({
<Tooltip kind="definitions" />
</h2>

{content.scope.map((method, index) => (
{content.scope.map((method, _index) => (
<div key={method.name}>
<h3
id={`definitions-${method.name}`}
Expand Down
4 changes: 2 additions & 2 deletions website/src/components/templates/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export { BaseTemplate } from "./BaseTemplate";
export { HtmlTemplate } from "./HtmlTemplate";
export { CategoryTemplate } from "./CategoryTemplate";
export { FuncTemplate } from "./FuncTemplate";
export { GroupTemplate } from "./GroupTemplate";
export { TypeTemplate } from "./TypeTemplate";
export { HtmlTemplate } from "./HtmlTemplate";
export { SymbolsTemplate } from "./SymbolsTemplate";
export { TypeTemplate } from "./TypeTemplate";
2 changes: 1 addition & 1 deletion website/src/components/ui/FunctionDefinition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { FC } from "hono/jsx";
import { basePath } from "../../metadata";
import type { Func } from "../../types/model";
import { joinPath } from "../../utils/path";
import { TypeIcon } from "./TypeIcon";
import { genPath } from "./genPath";
import { TypeIcon } from "./TypeIcon";
import { buildParamId, type2href } from "./type2href";

type FunctionDefinitionProps = {
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/ui/FunctionParameters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
}) => {
return (
<div class="space-y-6">
{func.params.map((param, index) => (
{func.params.map((param, _index) => (
<div
key={param.name}
class="bg-gray-50 rounded-md p-4 border border-gray-100"
Expand Down
6 changes: 3 additions & 3 deletions website/src/components/ui/common/SideNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const SideNavigation = ({
return (
<nav class="folding flex-none w-full bg-white border border-neutral-200/60 rounded-md sticky top-[80px] mt-4 mb-8 h-[calc(100vh-80px-1rem)] overflow-auto px-3.5 py-3">
<ul class="space-y-1 text-sm text-neutral-700">
{docs?.map((firstLevel, idx) => (
{docs?.map((firstLevel, _idx) => (
<>
{firstLevel.part && (
<li
Expand Down Expand Up @@ -63,7 +63,7 @@ export const SideNavigation = ({
x-transition:enter-start="opacity-0 transform -translate-y-2"
x-transition:enter-end="opacity-100 transform translate-y-0"
>
{firstLevel.children.map((secondLevel, idx2) => (
{firstLevel.children.map((secondLevel, _idx2) => (
<div key={secondLevel.route}>
{secondLevel.part && (
<li class="category py-1 text-sm font-semibold text-gray-500 tracking-wide">
Expand Down Expand Up @@ -112,7 +112,7 @@ export const SideNavigation = ({
x-transition:enter-end="opacity-100 transform translate-y-0"
>
{secondLevel.children.map(
(thirdLevel, idx3) => (
(thirdLevel, _idx3) => (
<div key={thirdLevel.route}>
{thirdLevel.part && (
<li class="category">
Expand Down
10 changes: 5 additions & 5 deletions website/src/components/ui/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { SiteNoticeBanner } from "./SiteNoticeBanner";
export { Header } from "./Header";
export { SiteTitle } from "./SiteTitle";
export { SideNavigation, type SideNavigationProps } from "./SideNavigation";
export { Breadcrumbs, type BreadcrumbsProps } from "./Breadcrumbs";
export { TableOfContents, type TableOfContentsProps } from "./TableOfContents";
export { Footer } from "./Footer";
export { Header } from "./Header";
export { SearchWindow } from "./SearchWindow";
export { SideNavigation, type SideNavigationProps } from "./SideNavigation";
export { SiteNoticeBanner } from "./SiteNoticeBanner";
export { SiteTitle } from "./SiteTitle";
export { TableOfContents, type TableOfContentsProps } from "./TableOfContents";
export { TranslationStatusAlert } from "./TranslationStatusAlert";
5 changes: 3 additions & 2 deletions website/src/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ code,
pre,
kbd,
samp {
font-family: "Cascadia Mono", SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
font-family:
"Cascadia Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
"Courier New", monospace;
}

/* Information box */
Expand Down
6 changes: 3 additions & 3 deletions website/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { serveStatic } from "@hono/node-server/serve-static";
import { Hono } from "hono";
import { appendTrailingSlash, trimTrailingSlash } from "hono/trailing-slash";
// Documentation generated by typst-docs.
import docsJson from "../../docs.json";
import {
CategoryTemplate,
FuncTemplate,
Expand All @@ -16,8 +18,6 @@ import { isPageOfKind } from "./utils/isPageOfKind";
import { removeBasePath } from "./utils/path";
import { registerRoutes } from "./utils/translationStatus";

// Documentation generated by typst-docs.
import docsJson from "../../docs.json";
const docs = docsJson as unknown as Page[];

const [flattenedPages, pagePaths] = flattenDocs(docs);
Expand Down Expand Up @@ -89,7 +89,7 @@ if (import.meta.env.DEV) {
rewriteRequestPath: (path) => {
return path.slice(basePath.length);
},
onNotFound: (path, c) => {
onNotFound: (path, _c) => {
console.log(
`${path} is not found while trying to serve a static asset`,
);
Expand Down
Loading