From 124966c27c62adcb3c0fc8a9c46bf8bdb0b90c0f Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Fri, 13 Dec 2024 15:21:38 +0800
Subject: [PATCH 1/7] test: auto lint
---
app/(main)/page.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/(main)/page.tsx b/app/(main)/page.tsx
index e7f0b6f..f41ff2b 100644
--- a/app/(main)/page.tsx
+++ b/app/(main)/page.tsx
@@ -7,5 +7,5 @@ export default async function Home() {
- )
+ );
}
From d26490d644b11fdd18c672dd0b7f52c59856cef2 Mon Sep 17 00:00:00 2001
From: hamster1963
Date: Fri, 13 Dec 2024 07:22:22 +0000
Subject: [PATCH 2/7] chore: auto-fix linting and formatting issues
---
app/(main)/page.tsx | 2 +-
bun.lockb | Bin 618282 -> 618282 bytes
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/(main)/page.tsx b/app/(main)/page.tsx
index f41ff2b..e7f0b6f 100644
--- a/app/(main)/page.tsx
+++ b/app/(main)/page.tsx
@@ -7,5 +7,5 @@ export default async function Home() {
- );
+ )
}
diff --git a/bun.lockb b/bun.lockb
index 49affa214770d9ff96adb5d70bcebb0b2f01b5a0..3278b7fb5041340bc2fd665212272d97d7da87bb 100755
GIT binary patch
delta 46
zcmZ2=Pj%Hj)rJF7M3lni{EiD##!nan&}y|uYSi0#B4y!zJ2vOj`{`wxJ472
delta 46
vcmZ2=Pj%Hj)rJF7M3lni{EiDF+f23>UXR_%m&2l+gHEisBZuOmFp4`
From 6529ed1b8d88e1b4caa88334dbcb426d55ec3376 Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Fri, 13 Dec 2024 15:23:37 +0800
Subject: [PATCH 3/7] fix: build
---
package.json | 1 -
1 file changed, 1 deletion(-)
diff --git a/package.json b/package.json
index 05b6032..9928853 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,6 @@
"name": "nezha-dash",
"version": "1.8.1",
"private": true,
- "type": "module",
"scripts": {
"dev": "next dev -p 3040",
"start": "node .next/standalone/server.js",
From ecd4688ec9eb8f97321f17257b85362d526a7a9c Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Fri, 13 Dec 2024 15:29:50 +0800
Subject: [PATCH 4/7] test: ues next lint
---
package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 9928853..5c1fc4f 100644
--- a/package.json
+++ b/package.json
@@ -5,8 +5,8 @@
"scripts": {
"dev": "next dev -p 3040",
"start": "node .next/standalone/server.js",
- "lint": "eslint",
- "lint:fix": "eslint --fix",
+ "lint": "next lint",
+ "lint:fix": "next lint --fix",
"format": "prettier --write .",
"build": "next build && cp -r .next/static .next/standalone/.next/ && cp -r public .next/standalone/",
"build-dev": "next build",
From 74418c6ae50b5afa069b1f7977f185e84983719d Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Fri, 13 Dec 2024 15:33:28 +0800
Subject: [PATCH 5/7] fix: use js config
---
.prettierrc.mjs => .prettierrc.js | 0
eslint.config.js | 7 ++++++-
2 files changed, 6 insertions(+), 1 deletion(-)
rename .prettierrc.mjs => .prettierrc.js (100%)
diff --git a/.prettierrc.mjs b/.prettierrc.js
similarity index 100%
rename from .prettierrc.mjs
rename to .prettierrc.js
diff --git a/eslint.config.js b/eslint.config.js
index 80ca66b..025fe3d 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -5,7 +5,12 @@ import tseslint from "typescript-eslint"
export default tseslint.config(
{ ignores: [".next"] },
{
- extends: [js.configs.recommended, ...tseslint.configs.recommended,"next/core-web-vitals", "next/typescript"],
+ extends: [
+ js.configs.recommended,
+ ...tseslint.configs.recommended,
+ "next/core-web-vitals",
+ "next/typescript",
+ ],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
From 01ac9403e9097faf86dbc4acad2d7c8cb6decf08 Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Fri, 13 Dec 2024 15:37:04 +0800
Subject: [PATCH 6/7] fix: eslint error
---
.eslintrc.json | 11 +++++++++++
eslint.config.js | 25 -------------------------
2 files changed, 11 insertions(+), 25 deletions(-)
create mode 100644 .eslintrc.json
delete mode 100644 eslint.config.js
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..9e6b2cb
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,11 @@
+{
+ "extends": [
+ "next/core-web-vitals",
+ "next/typescript"
+ ],
+ "rules": {
+ "@typescript-eslint/no-explicit-any": "off",
+ "@next/next/no-img-element": "off",
+ "react-hooks/exhaustive-deps": "off"
+ }
+}
diff --git a/eslint.config.js b/eslint.config.js
deleted file mode 100644
index 025fe3d..0000000
--- a/eslint.config.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import js from "@eslint/js"
-import globals from "globals"
-import tseslint from "typescript-eslint"
-
-export default tseslint.config(
- { ignores: [".next"] },
- {
- extends: [
- js.configs.recommended,
- ...tseslint.configs.recommended,
- "next/core-web-vitals",
- "next/typescript",
- ],
- files: ["**/*.{ts,tsx}"],
- languageOptions: {
- ecmaVersion: 2020,
- globals: globals.browser,
- },
- rules: {
- "@typescript-eslint/no-explicit-any": "off",
- "@next/next/no-img-element": "off",
- "react-hooks/exhaustive-deps": "off",
- },
- },
-)
From f6e0654bec11828cc6149c1e3db461eaa8d50e44 Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Fri, 13 Dec 2024 15:39:34 +0800
Subject: [PATCH 7/7] fix: prettier config
---
.eslintrc.json | 5 +----
.prettierrc.js | 12 ------------
.prettierrc.json | 12 ++++++++++++
3 files changed, 13 insertions(+), 16 deletions(-)
delete mode 100644 .prettierrc.js
create mode 100644 .prettierrc.json
diff --git a/.eslintrc.json b/.eslintrc.json
index 9e6b2cb..2884730 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,8 +1,5 @@
{
- "extends": [
- "next/core-web-vitals",
- "next/typescript"
- ],
+ "extends": ["next/core-web-vitals", "next/typescript"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@next/next/no-img-element": "off",
diff --git a/.prettierrc.js b/.prettierrc.js
deleted file mode 100644
index f3f8005..0000000
--- a/.prettierrc.js
+++ /dev/null
@@ -1,12 +0,0 @@
-export default {
- semi: false,
- singleQuote: false,
- printWidth: 100,
- tabWidth: 2,
- trailingComma: "all",
- importOrder: ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
- importOrderSeparation: true,
- importOrderSortSpecifiers: true,
- endOfLine: "auto",
- plugins: ["prettier-plugin-tailwindcss", "@trivago/prettier-plugin-sort-imports"],
-}
diff --git a/.prettierrc.json b/.prettierrc.json
new file mode 100644
index 0000000..55490b2
--- /dev/null
+++ b/.prettierrc.json
@@ -0,0 +1,12 @@
+{
+ "semi": false,
+ "singleQuote": false,
+ "printWidth": 100,
+ "tabWidth": 2,
+ "trailingComma": "all",
+ "importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
+ "importOrderSeparation": true,
+ "importOrderSortSpecifiers": true,
+ "endOfLine": "auto",
+ "plugins": ["prettier-plugin-tailwindcss", "@trivago/prettier-plugin-sort-imports"]
+}