chore(tooling): migrate from Biome to ESLint + Prettier

Replace Biome lint/check/format scripts with ESLint and Prettier commands, add Next + TypeScript oriented ESLint flat config, and remove biome.json. Update dependencies and lockfile to a single lint stack with Prettier-based formatting.
This commit is contained in:
zetaloop
2026-02-22 09:50:38 +08:00
parent acb04a02e7
commit f82a926b8f
6 changed files with 2462 additions and 165 deletions
+43
View File
@@ -0,0 +1,43 @@
import { defineConfig, globalIgnores } from "eslint/config"
import nextVitals from "eslint-config-next/core-web-vitals"
import nextTypescript from "eslint-config-next/typescript"
import prettier from "eslint-config-prettier/flat"
const eslintConfig = defineConfig([
...nextVitals,
...nextTypescript,
{
files: ["**/*.{ts,tsx,mts,cts}"],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"react-hooks/exhaustive-deps": "error",
"react-hooks/set-state-in-effect": "off",
"react-hooks/incompatible-library": "off",
"@next/next/no-async-client-component": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-unused-vars": [
"warn",
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
],
"@typescript-eslint/consistent-type-imports": [
"error",
{ prefer: "type-imports", fixStyle: "inline-type-imports" },
],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{ checksVoidReturn: { attributes: false } },
],
},
},
prettier,
globalIgnores([".next/**", "out/**", "build/**", "node_modules/**", "next-env.d.ts"]),
])
export default eslintConfig