Skip to content

fix(lint): replace FlatCompat with eslint-config-next flat configs - #27

Open
ephraimduncan wants to merge 1 commit into
mainfrom
fix/eslint-compat-clean
Open

fix(lint): replace FlatCompat with eslint-config-next flat configs#27
ephraimduncan wants to merge 1 commit into
mainfrom
fix/eslint-compat-clean

Conversation

@ephraimduncan

Copy link
Copy Markdown
Owner

Fixes the pre-existing lint crash flagged in #26.

pnpm lint on main dies with a circular-JSON error: eslint.config.js runs next/core-web-vitals and next/typescript through @eslint/eslintrc's FlatCompat, and the compat layer breaks under ESLint 9 + eslint-config-next 16.

eslint-config-next 16 ships native flat-config subpaths, so the fix is deletion: import eslint-config-next/core-web-vitals and eslint-config-next/typescript directly and drop FlatCompat (plus its path/fileURLToPath boilerplate). Also removes a perfectionist/sort-union-types group list referencing removed group names — default natural sort covers it.

Verified locally: eslint . on apps/web exits 0 (84 pre-existing warnings, 0 errors) vs. the circular-JSON crash before.

Once this lands, the continue-on-error on the lint step in #26 can be dropped.

eslint-config-next 16 ships native flat-config subpaths
(core-web-vitals, typescript), so the eslintrc compat layer is
unnecessary and crashed with a circular-JSON error. Drop FlatCompat
and import the flat configs directly. eslint now exits 0 on apps/web
(84 pre-existing warnings, 0 errors).

Also drop the perfectionist sort-union-types group list that referenced
removed group names — default natural sort handles it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant