f82a926b8f
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.
44 lines
1.4 KiB
JavaScript
44 lines
1.4 KiB
JavaScript
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
|