fix(lint): replace FlatCompat with eslint-config-next flat configs - #27
Open
ephraimduncan wants to merge 1 commit into
Open
fix(lint): replace FlatCompat with eslint-config-next flat configs#27ephraimduncan wants to merge 1 commit into
ephraimduncan wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the pre-existing lint crash flagged in #26.
pnpm linton main dies with a circular-JSON error:eslint.config.jsrunsnext/core-web-vitalsandnext/typescriptthrough@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-vitalsandeslint-config-next/typescriptdirectly and drop FlatCompat (plus its path/fileURLToPath boilerplate). Also removes aperfectionist/sort-union-typesgroup 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-erroron the lint step in #26 can be dropped.