mirror of
https://github.com/vernu/textbee.git
synced 2026-07-31 09:28:14 -04:00
Next 16 removed the `next lint` command, so `pnpm lint` was broken. Replace .eslintrc.json with an ESLint 9 flat config (eslint.config.mjs) that spreads eslint-config-next's native core-web-vitals flat config, and point the lint script at `eslint .`. Keep Next 16's newer react-hooks (v6) compiler-adjacent rules advisory (warn) rather than blocking, since they flag working-but-non-optimal patterns across the existing codebase. `pnpm lint` now passes (0 errors, warnings only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
33 lines
1.0 KiB
JavaScript
33 lines
1.0 KiB
JavaScript
import nextCoreWebVitals from 'eslint-config-next/core-web-vitals'
|
|
|
|
// Next 16 removed `next lint`; eslint-config-next now ships a native ESLint 9
|
|
// flat config, so we spread it directly (this replaces the old .eslintrc.json).
|
|
const eslintConfig = [
|
|
...nextCoreWebVitals,
|
|
{
|
|
rules: {
|
|
'react/no-unescaped-entities': 'off',
|
|
// Next 16 enables the newer react-hooks (v6) compiler-adjacent rules by
|
|
// default. They flag working-but-non-optimal patterns across this
|
|
// pre-existing codebase, so keep them advisory (warn) rather than
|
|
// blocking; tighten to error as components are refactored.
|
|
'react-hooks/set-state-in-effect': 'warn',
|
|
'react-hooks/purity': 'warn',
|
|
'react-hooks/static-components': 'warn',
|
|
'react-hooks/refs': 'warn',
|
|
'react-hooks/immutability': 'warn',
|
|
'react-hooks/incompatible-library': 'warn',
|
|
},
|
|
},
|
|
{
|
|
ignores: [
|
|
'.next/**',
|
|
'node_modules/**',
|
|
'test-results/**',
|
|
'playwright-report/**',
|
|
],
|
|
},
|
|
]
|
|
|
|
export default eslintConfig
|