From 06d731511f09694f305137b4dfb7bc0fa5ee2bb7 Mon Sep 17 00:00:00 2001
From: nico1988 <410827024@qq.com>
Date: Sat, 11 Feb 2023 18:25:54 +0800
Subject: [PATCH] fix: eslint rules
---
.eslintrc.json | 13 +++++++++++--
app/layout.tsx | 2 +-
app/page.tsx | 10 ++--------
components/Buttons.tsx | 8 +++-----
components/Dark.tsx | 14 +++++++-------
next.config.js | 6 ++++++
package.json | 2 +-
pages/_app.tsx | 6 ++----
8 files changed, 33 insertions(+), 28 deletions(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 3be4086..03b99fd 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -15,7 +15,6 @@
"plugin:jest-dom/recommended",
"plugin:testing-library/react"
],
- "parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
@@ -47,6 +46,16 @@
"no-undef": "off",
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
- "react/jsx-props-no-spreading": "off"
+ "react/jsx-props-no-spreading": "off",
+ "react/jsx-filename-extension": [
+ 1,
+ {
+ "extensions": [
+ ".tsx",
+ ".js",
+ ".jsx"
+ ]
+ }
+ ]
}
}
\ No newline at end of file
diff --git a/app/layout.tsx b/app/layout.tsx
index 6b6e9ea..d0775f5 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -6,7 +6,7 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
-
+
{children}
diff --git a/app/page.tsx b/app/page.tsx
index 41f5098..8e84885 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -1,15 +1,9 @@
-import { ThemeProvider } from 'next-themes';
-
function Index() {
return (
-
-