Skip to content

Commit b88332f

Browse files
committed
style: lint code
1 parent ba8c5c1 commit b88332f

File tree

10 files changed

+50
-43
lines changed

10 files changed

+50
-43
lines changed

web/biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"!**/.turbo",
1616
"!**/.source",
1717
"!**/convex/_generated",
18-
"!**/components/ui/**"
18+
"!**/components/ui"
1919
]
2020
},
2121
"formatter": {

web/src/components/memshell/main-config-card.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import {
4444
SelectValue,
4545
} from "@/components/ui/select.tsx";
4646
import { Switch } from "@/components/ui/switch.tsx";
47-
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
47+
import { Tabs } from "@/components/ui/tabs";
4848
import {
4949
type MainConfig,
5050
type ServerConfig,
@@ -133,7 +133,7 @@ export default function MainConfigCard({
133133
// 特殊环境的 JDK 版本
134134
if (
135135
(value === "SpringWebFlux" || value === "XXLJOB") &&
136-
Number.parseInt(form.getValues("targetJdkVersion") as string) < 52
136+
Number.parseInt(form.getValues("targetJdkVersion") as string, 10) < 52
137137
) {
138138
form.setValue("targetJdkVersion", "52");
139139
} else {

web/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function safeParseYup<T>(schema: yup.ObjectSchema<any>, data: unknown) {
4747
}
4848

4949
const createEnv = () => {
50-
// @ts-ignore
50+
// @ts-expect-error
5151
const envVars = Object.entries(import.meta.env).reduce<
5252
Record<string, string>
5353
>((acc, curr) => {

web/src/i18n/common/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
"usage": "Usage",
3535
"version.updateAvailable": "Update Available",
3636
"version.updateAvailableTooltip": "Click to Open Github Release Page ( v{{currentVersion}} -> v{{latestVersion}})"
37-
}
37+
}

web/src/i18n/common/zh-CN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
"usage": "使用指南",
3535
"version.updateAvailable": "有可用升级",
3636
"version.updateAvailableTooltip": "点击前往 GitHub Release ( v{{currentVersion}} -> v{{latestVersion}})"
37-
}
37+
}

web/src/index.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@
161161
@apply bg-background text-foreground;
162162
}
163163

164-
html, body {
164+
html,
165+
body {
165166
overflow: hidden;
166167
height: 100%;
167168
margin: 0;

web/src/pages/memshell.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ export default function MemShellPage() {
136136
form={form}
137137
/>
138138
<PackageConfigCard packerConfig={packerConfig} form={form} />
139-
<Button className="w-full" type="submit" disabled={isActionPending}>
139+
<Button
140+
className="w-full"
141+
type="submit"
142+
disabled={isActionPending}
143+
>
140144
{isActionPending ? (
141145
<LoaderCircle className="animate-spin" />
142146
) : (

web/src/pages/probeshell.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ export default function ProbeShellGenerator() {
110110
<div className="w-full xl:w-1/2 flex flex-col gap-4">
111111
<MainConfigCard form={form} servers={serverConfig} />
112112
<PackageConfigCard form={form} packerConfig={packerConfig} />
113-
<Button className="w-full" type="submit" disabled={isActionPending}>
113+
<Button
114+
className="w-full"
115+
type="submit"
116+
disabled={isActionPending}
117+
>
114118
{isActionPending ? (
115119
<LoaderCircle className="animate-spin" />
116120
) : (

web/src/router.tsx

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { createHashRouter } from "react-router-dom";
22
import RootLayout from "@/components/layouts/root-layout";
3+
import AboutPage from "@/pages/about";
34
import MemShellPage from "@/pages/memshell";
45
import ProbeShellPage from "@/pages/probeshell";
56
import type { MemShellFormSchema } from "@/types/schema";
6-
import AboutPage from "@/pages/about";
77

88
// Function to parse URL parameters into form default values
99
const parseUrlParams = (
@@ -63,37 +63,35 @@ const parseUrlParams = (
6363
return result;
6464
};
6565

66-
export const router = createHashRouter(
67-
[
68-
{
69-
path: "/",
70-
element: <RootLayout />,
71-
children: [
72-
{
73-
index: true,
74-
element: <MemShellPage />,
75-
loader: ({ request }) => {
76-
const url = new URL(request.url);
77-
return parseUrlParams(url.searchParams);
78-
},
79-
},
80-
{
81-
path: "memshell",
82-
element: <MemShellPage />,
83-
loader: ({ request }) => {
84-
const url = new URL(request.url);
85-
return parseUrlParams(url.searchParams);
86-
},
87-
},
88-
{
89-
path: "probeshell",
90-
element: <ProbeShellPage />,
66+
export const router = createHashRouter([
67+
{
68+
path: "/",
69+
element: <RootLayout />,
70+
children: [
71+
{
72+
index: true,
73+
element: <MemShellPage />,
74+
loader: ({ request }) => {
75+
const url = new URL(request.url);
76+
return parseUrlParams(url.searchParams);
9177
},
92-
{
93-
path: "about",
94-
element: <AboutPage />,
78+
},
79+
{
80+
path: "memshell",
81+
element: <MemShellPage />,
82+
loader: ({ request }) => {
83+
const url = new URL(request.url);
84+
return parseUrlParams(url.searchParams);
9585
},
96-
],
97-
},
98-
]
99-
);
86+
},
87+
{
88+
path: "probeshell",
89+
element: <ProbeShellPage />,
90+
},
91+
{
92+
path: "about",
93+
element: <AboutPage />,
94+
},
95+
],
96+
},
97+
]);

web/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import path from "node:path";
2+
import { env } from "node:process";
23
import tailwindcss from "@tailwindcss/vite";
34
import react from "@vitejs/plugin-react";
45
import { defineConfig } from "vite";
5-
import { env } from "node:process";
66

77
// https://vitejs.dev/config/
88
export default defineConfig({

0 commit comments

Comments
 (0)