From fc7d86380cb02c6c6f964e930f4acd36514fb3d8 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 13 Nov 2024 17:03:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85eslint=E5=86=B2=E7=AA=81?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 2 +- next.config.js | 4 +++- package.json | 4 +--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e2a5efe4..f2744021 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,7 +8,7 @@ module.exports = { 'plugin:react/jsx-runtime', 'plugin:react/recommended', 'plugin:@next/next/recommended', - 'standard', + 'next', 'prettier', 'plugin:@typescript-eslint/recommended', // 添加 TypeScript 推荐规则 'plugin:@typescript-eslint/recommended-requiring-type-checking' // 添加需要类型检查的规则 diff --git a/next.config.js b/next.config.js index 5637feb5..00d08665 100644 --- a/next.config.js +++ b/next.config.js @@ -228,4 +228,6 @@ const nextConfig = { } } -module.exports = withBundleAnalyzer(nextConfig) +module.exports = process.env.ANALYZE + ? withBundleAnalyzer(nextConfig) + : nextConfig diff --git a/package.json b/package.json index b585dec3..35d90ad9 100644 --- a/package.json +++ b/package.json @@ -52,14 +52,12 @@ "@waline/client": "^2.5.1", "autoprefixer": "^10.4.13", "cross-env": "^7.0.3", - "eslint": "^8.56.0", + "eslint": "^8.57.1", "eslint-config-next": "^13.1.1", "eslint-config-prettier": "^9.1.0", - "eslint-config-standard": "^16.0.2", "eslint-plugin-import": "^2.23.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-promise": "^5.1.0", "eslint-plugin-react": "^7.34.3", "eslint-plugin-react-hooks": "^4.6.2", "next-sitemap": "^1.6.203",