fix: lint

This commit is contained in:
hamster1963 2024-12-13 15:19:21 +08:00
parent 55cc033cf5
commit 408cd9ce4b
4 changed files with 22 additions and 1 deletions

View File

@ -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
}

BIN
bun.lockb

Binary file not shown.

20
eslint.config.js Normal file
View File

@ -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",
},
},
)

View File

@ -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",