Files
novalon-website/eslint.config.mjs
T
张翔 fecbfd1990 feat: 添加预览效果页面并优化交互效果
refactor: 优化代码健壮性和类型安全

style: 更新字体样式和全局CSS

fix: 修复IntersectionObserver潜在空引用问题

chore: 更新依赖和ESLint配置

build: 更新构建ID和路由配置
2026-02-24 10:24:05 +08:00

40 lines
1.2 KiB
JavaScript

import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
globalIgnores([
".next/**",
"out/**",
"build/**",
"dist/**",
"next-env.d.ts",
]),
{
rules: {
"react/no-unescaped-entities": "error",
"react/jsx-no-target-blank": "error",
"react/jsx-curly-brace-presence": ["error", { "props": "never", "children": "never" }],
"react/self-closing-comp": "error",
"react/jsx-boolean-value": ["error", "never"],
"@typescript-eslint/no-unused-vars": ["error", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "warn",
"no-console": ["warn", { "allow": ["warn", "error"] }],
"prefer-const": "error",
"no-var": "error",
"eqeqeq": ["error", "always"],
"curly": ["error", "all"],
"no-throw-literal": "error",
"prefer-promise-reject-errors": "error",
},
},
]);
export default eslintConfig;