Skip to content

Commit f4049f7

Browse files
committed
lint
1 parent c68ae3a commit f4049f7

File tree

7 files changed

+85
-100
lines changed

7 files changed

+85
-100
lines changed

webui/next.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
const nextConfig = (phase, { defaultConfig }) => {
2121
return {
2222
reactStrictMode: true,
23-
output: 'standalone',
23+
output: "standalone",
2424
};
2525
};
2626

webui/package.json

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
{
2-
"name": "kvrocks-controller-ui",
3-
"version": "0.1.0",
4-
"private": true,
5-
"scripts": {
6-
"dev": "next dev --turbopack",
7-
"build": "next build",
8-
"start": "next start",
9-
"lint": "next lint",
10-
"deploy": "next build && cp -r .next/static .next/standalone/.next/ && cp -r public .next/standalone/"
11-
},
12-
"dependencies": {
13-
"@emotion/react": "^11.11.3",
14-
"@emotion/styled": "^11.11.0",
15-
"@fortawesome/fontawesome-svg-core": "^6.6.0",
16-
"@fortawesome/free-brands-svg-icons": "^6.6.0",
17-
"@fortawesome/free-solid-svg-icons": "^6.6.0",
18-
"@fortawesome/react-fontawesome": "^0.2.2",
19-
"@mui/icons-material": "^5.15.7",
20-
"@mui/material": "^5.15.5",
21-
"@types/js-yaml": "^4.0.9",
22-
"axios": "^1.6.7",
23-
"js-yaml": "^4.1.0",
24-
"next": "15.5.4",
25-
"react": "19.2.0",
26-
"react-dom": "19.2.0"
27-
},
28-
"devDependencies": {
29-
"@types/node": "^20",
30-
"@types/react": "19.2.2",
31-
"@types/react-dom": "19.2.1",
32-
"autoprefixer": "^10.0.1",
33-
"eslint": "^8",
34-
"eslint-config-next": "15.5.4",
35-
"eslint-config-prettier": "^10.1.1",
36-
"postcss": "^8",
37-
"prettier": "^3.5.3",
38-
"prettier-plugin-tailwindcss": "^0.6.11",
39-
"tailwindcss": "^3.3.0",
40-
"typescript": "^5"
41-
},
42-
"overrides": {
43-
"@types/react": "19.2.2",
44-
"@types/react-dom": "19.2.1"
45-
}
2+
"name": "kvrocks-controller-ui",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev --turbopack",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint",
10+
"deploy": "next build && cp -r .next/static .next/standalone/.next/ && cp -r public .next/standalone/"
11+
},
12+
"dependencies": {
13+
"@emotion/react": "^11.11.3",
14+
"@emotion/styled": "^11.11.0",
15+
"@fortawesome/fontawesome-svg-core": "^6.6.0",
16+
"@fortawesome/free-brands-svg-icons": "^6.6.0",
17+
"@fortawesome/free-solid-svg-icons": "^6.6.0",
18+
"@fortawesome/react-fontawesome": "^0.2.2",
19+
"@mui/icons-material": "^5.15.7",
20+
"@mui/material": "^5.15.5",
21+
"@types/js-yaml": "^4.0.9",
22+
"axios": "^1.6.7",
23+
"js-yaml": "^4.1.0",
24+
"next": "15.5.4",
25+
"react": "19.2.0",
26+
"react-dom": "19.2.0"
27+
},
28+
"devDependencies": {
29+
"@types/node": "^20",
30+
"@types/react": "19.2.2",
31+
"@types/react-dom": "19.2.1",
32+
"autoprefixer": "^10.0.1",
33+
"eslint": "^8",
34+
"eslint-config-next": "15.5.4",
35+
"eslint-config-prettier": "^10.1.1",
36+
"postcss": "^8",
37+
"prettier": "^3.6.2",
38+
"prettier-plugin-tailwindcss": "^0.6.11",
39+
"tailwindcss": "^3.3.0",
40+
"typescript": "^5"
41+
},
42+
"overrides": {
43+
"@types/react": "19.2.2",
44+
"@types/react-dom": "19.2.1"
45+
}
4646
}

webui/src/app/namespaces/[namespace]/clusters/[cluster]/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ type FilterOption =
9595
| "with-importing";
9696
type SortOption = "index-asc" | "index-desc" | "nodes-desc" | "nodes-asc";
9797

98-
export default function Cluster(props: { params: Promise<{ namespace: string; cluster: string }> }) {
98+
export default function Cluster(props: {
99+
params: Promise<{ namespace: string; cluster: string }>;
100+
}) {
99101
const params = use(props.params);
100102
const { namespace, cluster } = params;
101103
const [shardsData, setShardsData] = useState<ShardData[]>([]);

webui/src/app/namespaces/[namespace]/clusters/[cluster]/shards/[shard]/nodes/[node]/page.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ import NetworkCheckIcon from "@mui/icons-material/NetworkCheck";
3939
import SecurityIcon from "@mui/icons-material/Security";
4040
import LinkIcon from "@mui/icons-material/Link";
4141

42-
export default function Node(
43-
props: {
44-
params: Promise<{ namespace: string; cluster: string; shard: string; node: string }>;
45-
}
46-
) {
42+
export default function Node(props: {
43+
params: Promise<{ namespace: string; cluster: string; shard: string; node: string }>;
44+
}) {
4745
const params = use(props.params);
4846
const { namespace, cluster, shard, node } = params;
4947
const router = useRouter();

webui/src/app/namespaces/[namespace]/clusters/[cluster]/shards/[shard]/page.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,9 @@ import DeleteIcon from "@mui/icons-material/Delete";
6060
import SwapHorizIcon from "@mui/icons-material/SwapHoriz";
6161
import { FailoverDialog } from "@/app/ui/failoverDialog";
6262

63-
export default function Shard(
64-
props: {
65-
params: Promise<{ namespace: string; cluster: string; shard: string }>;
66-
}
67-
) {
63+
export default function Shard(props: {
64+
params: Promise<{ namespace: string; cluster: string; shard: string }>;
65+
}) {
6866
const params = use(props.params);
6967
const { namespace, cluster, shard } = params;
7068
const [nodesData, setNodesData] = useState<any>(null);

webui/src/middleware.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ import { NextResponse } from "next/server";
22
import type { NextRequest } from "next/server";
33

44
export function middleware(req: NextRequest) {
5-
const url = req.nextUrl.clone()
5+
const url = req.nextUrl.clone();
66

77
if (url.pathname.startsWith("/api/v1")) {
8-
const host = process.env.KVCTL_API_HOST || "localhost:9379"
8+
const host = process.env.KVCTL_API_HOST || "localhost:9379";
99
url.host = host;
1010

11-
return NextResponse.rewrite(url)
11+
return NextResponse.rewrite(url);
1212
}
1313

14-
return NextResponse.next()
14+
return NextResponse.next();
1515
}
1616

1717
export const config = {
1818
matcher: "/api/v1/:path*",
19-
runtime: 'nodejs',
20-
}
19+
runtime: "nodejs",
20+
};

webui/tsconfig.json

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,30 @@
1515
* KIND, either express or implied. See the License for the
1616
* specific language governing permissions and limitations
1717
* under the License.
18-
*/{
19-
"compilerOptions": {
20-
"lib": [
21-
"dom",
22-
"dom.iterable",
23-
"esnext"
24-
],
25-
"allowJs": true,
26-
"skipLibCheck": true,
27-
"strict": true,
28-
"noEmit": true,
29-
"esModuleInterop": true,
30-
"module": "esnext",
31-
"moduleResolution": "bundler",
32-
"resolveJsonModule": true,
33-
"isolatedModules": true,
34-
"jsx": "preserve",
35-
"incremental": true,
36-
"plugins": [
37-
{
38-
"name": "next"
39-
}
40-
],
41-
"paths": {
42-
"@/*": [
43-
"./src/*"
44-
]
18+
*/ {
19+
"compilerOptions": {
20+
"lib": ["dom", "dom.iterable", "esnext"],
21+
"allowJs": true,
22+
"skipLibCheck": true,
23+
"strict": true,
24+
"noEmit": true,
25+
"esModuleInterop": true,
26+
"module": "esnext",
27+
"moduleResolution": "bundler",
28+
"resolveJsonModule": true,
29+
"isolatedModules": true,
30+
"jsx": "preserve",
31+
"incremental": true,
32+
"plugins": [
33+
{
34+
"name": "next"
35+
}
36+
],
37+
"paths": {
38+
"@/*": ["./src/*"]
39+
},
40+
"target": "ES2017"
4541
},
46-
"target": "ES2017"
47-
},
48-
"include": [
49-
"next-env.d.ts",
50-
"**/*.ts",
51-
"**/*.tsx",
52-
".next/types/**/*.ts"
53-
],
54-
"exclude": [
55-
"node_modules"
56-
]
42+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
43+
"exclude": ["node_modules"]
5744
}

0 commit comments

Comments
 (0)