fix: prettier don't work

This commit is contained in:
SevicheCC 2023-06-09 19:27:12 +08:00
parent d5d54f5769
commit f8e5909ddd
Signed by: SevicheCC
GPG key ID: C577000000000000
4 changed files with 11 additions and 5 deletions

1
.husky/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
_

View file

@ -2,3 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh" . "$(dirname -- "$0")/_/husky.sh"
pnpm lint pnpm lint
npx lint-staged

View file

@ -1,8 +1,8 @@
"use client" "use client";
import * as React from "react" import * as React from "react";
import { ThemeProvider as NextThemesProvider } from "next-themes" import { ThemeProvider as NextThemesProvider } from "next-themes";
import { ThemeProviderProps } from "next-themes/dist/types" import { ThemeProviderProps } from "next-themes/dist/types";
export function ThemeProvider({ children, ...props }: ThemeProviderProps) { export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider> return <NextThemesProvider {...props}>{children}</NextThemesProvider>

View file

@ -47,5 +47,9 @@
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"postcss": "^8.4.24", "postcss": "^8.4.24",
"typescript": "5.0.4" "typescript": "5.0.4"
},
"lint-staged": {
"*.js": "eslint --cache --fix",
"*.{js,css,md}": "prettier --write"
} }
} }