chore(tooling): fix tseslint.config deprecation#51
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe PR reorganizes the packages/contracts directory structure by relocating schema.graphql from a nested graphql subdirectory to the root level. All references to this file are updated across configuration and validation scripts. Additionally, the ESLint configuration is updated to address deprecation by replacing tseslint.config with defineConfig from eslint/config, and ignore patterns are adjusted across multiple configuration files. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
eslint.config.mjs (1)
8-15:⚠️ Potential issue | 🟠 MajorIgnore list doesn’t cover the generated contracts path.
Line 10 only ignores
packages/contracts/**, but the new GraphQL artifacts live underapps/packages/contracts/..., so ESLint still lint-checks generated output. Either relocate the contracts package topackages/contractsor add an explicit ignore for the current path.Based on learnings "Place GraphQL/OpenAPI contracts in `packages/contracts`".🛠️ Suggested ignore update (if keeping current path)
{ ignores: [ "packages/clients/**", "packages/contracts/**", + "apps/packages/contracts/**", "**/dist/**", "**/build/**",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@eslint.config.mjs` around lines 8 - 15, The ESLint ignore list currently only has "packages/contracts/**" so generated GraphQL artifacts under the actual path "apps/packages/contracts/**" are still linted; update the ignores array in eslint.config.mjs to include the current generated-contracts path (e.g., add "apps/packages/contracts/**" or a broader pattern like "**/apps/packages/contracts/**") OR relocate the contracts package into "packages/contracts" so the existing "packages/contracts/**" pattern catches it; modify the "ignores" entry (referencing the ignores array and the existing "packages/contracts/**" pattern) accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/packages/contracts/graphql/generated-types.ts`:
- Around line 576-579: The generated NexusGenEnums contains PublicationStatus
with lowercase values ("draft" | "published") that don't match the GraphQL
schema's enum tokens (DRAFT | PUBLISHED); update the generated types so
PublicationStatus uses the exact schema casing (e.g., "DRAFT" | "PUBLISHED") by
regenerating the types from the canonical schema or adjusting the
generator/config so enum casing is preserved; locate NexusGenEnums ->
PublicationStatus in generated-types.ts and ensure the enum literal strings
match the schema tokens exactly.
---
Outside diff comments:
In `@eslint.config.mjs`:
- Around line 8-15: The ESLint ignore list currently only has
"packages/contracts/**" so generated GraphQL artifacts under the actual path
"apps/packages/contracts/**" are still linted; update the ignores array in
eslint.config.mjs to include the current generated-contracts path (e.g., add
"apps/packages/contracts/**" or a broader pattern like
"**/apps/packages/contracts/**") OR relocate the contracts package into
"packages/contracts" so the existing "packages/contracts/**" pattern catches it;
modify the "ignores" entry (referencing the ignores array and the existing
"packages/contracts/**" pattern) accordingly.
…/config Co-authored-by: Cursor <cursoragent@cursor.com>
a64103e to
b61da6f
Compare
Resolves #50
Summary
Replace deprecated
tseslint.config()with ESLint'sdefineConfig()fromeslint/config. Same flattening behavior, removes deprecation warning.Contracts Changed
Regeneration Required
Validation
Summary by CodeRabbit