From b47b8d17c6ba48bbf9b7790db6f623f7ae0786f7 Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Fri, 13 Dec 2024 15:19:21 +0800
Subject: [PATCH] fix: lint
---
app/(main)/page.tsx | 2 +-
auth.ts | 2 +-
bun.lockb | Bin 618282 -> 618282 bytes
eslint.config.js | 20 ++++++++++++++++++++
package.json | 1 +
5 files changed, 23 insertions(+), 2 deletions(-)
create mode 100644 eslint.config.js
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/auth.ts b/auth.ts
index 0dd5b26..8b5698f 100644
--- a/auth.ts
+++ b/auth.ts
@@ -22,7 +22,7 @@ export const { handlers, signIn, signOut, auth } = NextAuth({
],
callbacks: {
async signIn({ user }) {
- // @ts-ignore
+ // @ts-expect-error user is not null
if (user.error) {
return false
}
diff --git a/bun.lockb b/bun.lockb
index 3278b7fb5041340bc2fd665212272d97d7da87bb..49affa214770d9ff96adb5d70bcebb0b2f01b5a0 100755
GIT binary patch
delta 46
vcmZ2=Pj%Hj)rJF7M3lni{EiDF+f23>UXR_%m&2l+gHEisBZuOmFp4`
delta 46
zcmZ2=Pj%Hj)rJF7M3lni{EiD##!nan&}y|uYSi0#B4y!zJ2vOj`{`wxJ472
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000..0f7515f
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,20 @@
+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],
+ 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",
+ },
+ },
+)
diff --git a/package.json b/package.json
index 9928853..05b6032 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"name": "nezha-dash",
"version": "1.8.1",
"private": true,
+ "type": "module",
"scripts": {
"dev": "next dev -p 3040",
"start": "node .next/standalone/server.js",