Skip to content

Commit 0783a3c

Browse files
authored
chore: upgrade to Biome v2 (#297)
1 parent e3a07ac commit 0783a3c

File tree

20 files changed

+215
-183
lines changed

20 files changed

+215
-183
lines changed

website/biome.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

website/biome.jsonc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"includes": ["**"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "tab"
15+
},
16+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
17+
"linter": {
18+
"enabled": true,
19+
"rules": {
20+
"recommended": true,
21+
"style": {
22+
"noParameterAssign": "error",
23+
"useAsConstAssertion": "error",
24+
"useDefaultParameterLast": "error",
25+
"useEnumInitializers": "error",
26+
"useSelfClosingElements": "error",
27+
"useSingleVarDeclarator": "error",
28+
"noUnusedTemplateLiteral": "error",
29+
"useNumberNamespace": "error",
30+
"noInferrableTypes": "error",
31+
"noUselessElse": "error"
32+
}
33+
}
34+
},
35+
"javascript": {
36+
"formatter": {
37+
"quoteStyle": "double"
38+
}
39+
}
40+
}

website/bun.lockb

0 Bytes
Binary file not shown.

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"test": "vitest"
1313
},
1414
"devDependencies": {
15-
"@biomejs/biome": "1.9.4",
15+
"@biomejs/biome": "2.0.6",
1616
"@hono/ssg-plugins-essential": "^0.1.0",
1717
"@hono/vite-dev-server": "^0.20.1",
1818
"@hono/vite-ssg": "^0.2.0",
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Tabler Icons
22
// https://tabler.io/icons
3-
export { HomeIcon } from "./HomeIcon";
3+
4+
export { AlertTriangleIcon } from "./AlertTriangleIcon";
45
export { CaretRightCircleIcon } from "./CaretRightCircleIcon";
5-
export { InfoCircleIcon } from "./InfoCircleIcon";
6-
export { HelpCircleIcon } from "./HelpCircleIcon";
76
export { ChevronLeftIcon } from "./ChevronLeftIcon";
87
export { ChevronRightIcon } from "./ChevronRightIcon";
9-
export { AlertTriangleIcon } from "./AlertTriangleIcon";
10-
export { MenuIcon } from "./MenuIcon";
118
export { CloseIcon } from "./CloseIcon";
12-
export { SearchIcon } from "./SearchIcon";
13-
export { LanguageIcon } from "./LanguageIcon";
14-
export { WorldIcon } from "./WorldIcon";
15-
9+
export { DiscordIcon } from "./DiscordIcon";
1610
// Simple Icons
1711
// https://simpleicons.org/
1812
export { GitHubIcon } from "./GitHubIcon";
19-
export { DiscordIcon } from "./DiscordIcon";
13+
export { HelpCircleIcon } from "./HelpCircleIcon";
14+
export { HomeIcon } from "./HomeIcon";
15+
export { InfoCircleIcon } from "./InfoCircleIcon";
16+
export { LanguageIcon } from "./LanguageIcon";
17+
export { MenuIcon } from "./MenuIcon";
18+
export { SearchIcon } from "./SearchIcon";
19+
export { WorldIcon } from "./WorldIcon";

website/src/components/templates/FuncTemplate.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,14 @@ function ScopedDefinitions({
102102
{parent ? (
103103
// Currently, the scope has at most two levels.
104104
// Therefore, it is sufficient to only annotate the direct `parent`.
105-
<>
106-
<Translation translationKey="definitionOf" name={parent.name} />
107-
</>
105+
<Translation translationKey="definitionOf" name={parent.name} />
108106
) : (
109107
<Translation translationKey="definition" />
110108
)}
111109
<Tooltip kind="definitions" />
112110
</h2>
113111

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

117115
return (

website/src/components/templates/GroupTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const GroupTemplate: FC<GroupTemplateProps> = ({
3434
<>
3535
<h2 id="functions">Function</h2>
3636

37-
{content.functions.map((method, index) => (
37+
{content.functions.map((method, _index) => (
3838
<div key={method.name}>
3939
<h3 id={`functions-${method.name}`} class="method-head">
4040
<code class="text-base font-medium">{method.name}</code>

website/src/components/templates/TypeTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const TypeTemplate: FC<TypeTemplateProps> = ({
5757
<Tooltip kind="definitions" />
5858
</h2>
5959

60-
{content.scope.map((method, index) => (
60+
{content.scope.map((method, _index) => (
6161
<div key={method.name}>
6262
<h3
6363
id={`definitions-${method.name}`}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export { BaseTemplate } from "./BaseTemplate";
2-
export { HtmlTemplate } from "./HtmlTemplate";
32
export { CategoryTemplate } from "./CategoryTemplate";
43
export { FuncTemplate } from "./FuncTemplate";
54
export { GroupTemplate } from "./GroupTemplate";
6-
export { TypeTemplate } from "./TypeTemplate";
5+
export { HtmlTemplate } from "./HtmlTemplate";
76
export { SymbolsTemplate } from "./SymbolsTemplate";
7+
export { TypeTemplate } from "./TypeTemplate";

website/src/components/ui/FunctionDefinition.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { FC } from "hono/jsx";
22
import { basePath } from "../../metadata";
33
import type { Func } from "../../types/model";
44
import { joinPath } from "../../utils/path";
5-
import { TypeIcon } from "./TypeIcon";
65
import { genPath } from "./genPath";
6+
import { TypeIcon } from "./TypeIcon";
77
import { buildParamId, type2href } from "./type2href";
88

99
type FunctionDefinitionProps = {

0 commit comments

Comments
 (0)