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