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:
@@ -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
|
||||
Reference in New Issue
Block a user