chore(lint): migrate to @constructive-io/eslint-config flat config - #330
Merged
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Summary
pnpm lintwas a no-op-turned-failure onmain: ESLint 9 is installed but the repo only had.eslintrc.json, which ESLint 9 does not read. This replaces it with a rooteslint.config.mjsextending
@constructive-io/eslint-config(same shape asdev-utils' root config), and getspnpm lintto exit 0 across all packages.Three commits, deliberately separated:
eslint.config.mjs+ drop.eslintrc.json+ add the shared config devDependency(direct plugin devDeps kept, matching
dev-utils).(
obj.hasOwnProperty(k)→Object.prototype.hasOwnProperty.call(obj, k)in fourclean-tree-style helpers, two empty-block comments indeparser.ts, one uselesstry { ... } catch (e) { throw e }indeparser/test-utils).eslint --fixchurn (quotes/indent/semicolons/import sorting) — 141 files, no logic.Generated output is ignored rather than linted, since linting it is churn that the next
regeneration wipes:
__fixtures__/**,**/__snapshots__/**, thebuild:protooutput inpackages/{utils,traverse,transform-ast}andproto-parser/test-utils, the inferredpgsql-types/src/types.ts,quotes/src/kwlist.ts, and the generated**/__tests__/kitchen-sink/**suites. Nothing under__fixtures__/or__snapshots__/ismodified by this PR.
Two rule exemptions live in this repo's config (not the shared package):
Verification
pnpm lint— exit 0 (warnings remain, no errors)pnpm build— passespnpm test— all packages with tests pass (3078 tests).pgsql-typesandpgsql-clifail withjest's "No tests found"; both packages contain zero test files and fail identically on
main.Follow-ups (not in this PR)
pnpm lint.proto-parser/src/inline-helpers/nested-obj.tsemitspath.replace(/[(w+)]/g, ...)— theescapes are eaten by the template literal, so the generated helper's regex is wrong (visible in
__fixtures__/output/utils/astHelpers/inlineNestedObj/path-obj.ts). Fixing it changes generatedoutput and fixtures, so it is left alone here;
no-useless-escapeis the rule that surfaced it.Link to Devin session: https://app.devin.ai/sessions/54ff483314294ceaaa79a4c0724ce14b
Requested by: @pyramation