mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix: lint
This commit is contained in:
parent
55cc033cf5
commit
408cd9ce4b
2
auth.ts
2
auth.ts
@ -22,7 +22,7 @@ export const { handlers, signIn, signOut, auth } = NextAuth({
|
|||||||
],
|
],
|
||||||
callbacks: {
|
callbacks: {
|
||||||
async signIn({ user }) {
|
async signIn({ user }) {
|
||||||
// @ts-ignore
|
// @ts-expect-error user is not null
|
||||||
if (user.error) {
|
if (user.error) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
20
eslint.config.js
Normal file
20
eslint.config.js
Normal 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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
)
|
@ -2,6 +2,7 @@
|
|||||||
"name": "nezha-dash",
|
"name": "nezha-dash",
|
||||||
"version": "1.8.1",
|
"version": "1.8.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 3040",
|
"dev": "next dev -p 3040",
|
||||||
"start": "node .next/standalone/server.js",
|
"start": "node .next/standalone/server.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user