Visitar URL original
feat(code-quality): add ESLint flat config with TypeScript + React hooks rules by abhigyan1102 · Pull Request #1 · abhigyan1102/event-seal · GitHub
Skip to content

feat(code-quality): add ESLint flat config with TypeScript + React hooks rules - #1

Merged
abhigyan1102 merged 3 commits into
mainfrom
feat/code-quality-eslint
Aug 14, 2026
Merged

abhigyan1102 merged 3 commits into
mainfrom
feat/code-quality-eslint

Conversation

@abhigyan1102

@abhigyan1102 abhigyan1102 commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

What

  • Add eslint.config.mjs with typescript-eslint recommendedTypeChecked rules
  • Add eslint-plugin-react-hooks scoped to apps/web
  • Deno functions/ linted with syntax-only rules (no Node tsconfig)
  • Add packages/sdk/tsconfig.test.json so test files are covered by type-aware rules
  • Fix App.tsx: inline type import for FormEvent, void-wrap async onSubmit
  • Add lint and lint:fix scripts to root package.json

Verification

npm run check passes: typecheck ✓ | 3 tests ✓ | build ✓
npm run lint exits 0 with zero errors

Part of Phase 1 — Code Quality

PR 1/4 in the code-quality phase.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Added project-wide linting commands to check and automatically fix code quality issues.
    • Expanded linting coverage across applications, packages, tests, and serverless code.
    • Added TypeScript test configuration to improve SDK validation.
    • Standardized supported Node.js and TypeScript versions.
  • Bug Fixes

    • Improved form submission handling so asynchronous submissions are processed reliably.

…oks rules

- Add eslint.config.mjs with typescript-eslint recommendedTypeChecked
- Add eslint-plugin-react-hooks for apps/web
- Deno functions linted with syntax-only rules (no Node tsconfig)
- Add packages/sdk/tsconfig.test.json so test files are covered
- Fix App.tsx: inline type import for FormEvent, void-wrap async onSubmit
- Add lint and lint:fix scripts to root package.json

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@abhigyan1102, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 94 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 991322b4-cb29-49b4-b132-ae1d6fe408db

📥 Commits

Reviewing files that changed from the base of the PR and between 32f0d62 and 9cbf4d5.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • apps/web/src/App.tsx
  • eslint.config.mjs
  • package.json
  • packages/sdk/tsconfig.test.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 30232b92-6776-4191-a71f-0204ae09d470

📥 Commits

Reviewing files that changed from the base of the PR and between 0fb860a and 9cbf4d5.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • apps/web/src/App.tsx
  • package.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • package.json
  • apps/web/src/App.tsx

📝 Walkthrough

Walkthrough

The pull request adds repository-wide ESLint tooling and scoped rules, introduces lint scripts and an SDK test configuration, and updates the web form code to satisfy the new rules.

Changes

Repository linting

Layer / File(s) Summary
Lint tooling and repository configuration
eslint.config.mjs, package.json, packages/sdk/tsconfig.test.json
Adds ESLint dependencies, lint scripts, flat configuration, TypeScript and React Hooks rules, repository ignores, shared globals, and an SDK test-project configuration.
Web lint compliance
apps/web/src/App.tsx
Uses a type-only FormEvent import and explicitly discards the asynchronous form submission result.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 9cbf4

The PR adds linting configuration and localized fixes without any supplied merge-blocking issue; it is merge-ready after normal checks and review.

Possibly related PRs

  • abhigyan1102/event-seal#2: Adds the same ESLint configuration, tooling updates, TypeScript test configuration, and App.tsx lint fixes, with additional Husky and check-script changes.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: adding an ESLint flat configuration with TypeScript and React Hooks rules.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/code-quality-eslint

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
eslint.config.mjs (1)

48-63: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Scope runtime globals by file set.

The unscoped languageOptions.globals block applies both browser and Node globals to every file. This weakens no-undef checks across browser, Node, and Deno code. The Deno block also declares no Deno global, so its current Deno.* usages can produce lint errors. Scope browser, Node, and Deno globals to their respective file sets.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@eslint.config.mjs` around lines 48 - 63, Scope each languageOptions.globals
configuration to its corresponding browser, Node, or Deno file pattern instead
of applying it globally. Update the Deno configuration block for
functions/**/*.ts to declare the Deno global, while preserving the existing
TypeScript rules and ensuring each runtime’s globals do not leak into other file
sets.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@eslint.config.mjs`:
- Around line 26-31: Update the package.json Node engine constraint to require
Node >=20.11.0, matching the use of import.meta.dirname in the ESLint
configuration. Keep the existing ESLint parserOptions configuration unchanged.

---

Nitpick comments:
In `@eslint.config.mjs`:
- Around line 48-63: Scope each languageOptions.globals configuration to its
corresponding browser, Node, or Deno file pattern instead of applying it
globally. Update the Deno configuration block for functions/**/*.ts to declare
the Deno global, while preserving the existing TypeScript rules and ensuring
each runtime’s globals do not leak into other file sets.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 77878993-80ed-400f-824b-bac7eb40450f

📥 Commits

Reviewing files that changed from the base of the PR and between 32f0d62 and 0fb860a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • apps/web/src/App.tsx
  • eslint.config.mjs
  • package.json
  • packages/sdk/tsconfig.test.json

Comment thread eslint.config.mjs Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a repo-wide ESLint flat configuration aimed at enabling TypeScript type-aware linting (where possible) and adding React Hooks linting for the web app, while also adjusting minor app code to satisfy stricter async/promise lint rules.

Changes:

  • Added eslint.config.mjs using typescript-eslint type-checked recommendations plus eslint-plugin-react-hooks scoped to apps/web.
  • Added root lint / lint:fix scripts and new lint-related devDependencies; updated Node engine requirement.
  • Added packages/sdk/tsconfig.test.json to bring SDK test files under type-aware linting; adjusted App.tsx form submit handler to avoid floating async promises.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/sdk/tsconfig.test.json Adds a dedicated TS config so SDK tests can participate in type-aware linting.
package.json Adds lint scripts + ESLint-related devDependencies and bumps the Node engine floor.
package-lock.json Locks the new ESLint/tooling dependency graph (including TypeScript resolution changes).
eslint.config.mjs Introduces the ESLint flat config with typed TS rules, Deno function handling, and React Hooks rules.
apps/web/src/App.tsx Tweaks imports and wraps async onSubmit to comply with promise-handling lint rules.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json Resolved
typescript-eslint@8.38.0 requires typescript >=4.8.4 <5.9.0.
Using ^5.8.3 would allow npm to resolve 5.9.x on fresh installs,
breaking linting. Tilde range ~5.8.3 constrains to 5.8.x only.

Also format App.tsx with Prettier.
@abhigyan1102

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@abhigyan1102

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 94 minutes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

eslint.config.mjs:90

  • The config currently applies both globals.browser and globals.node to every file. This makes Node-only globals (e.g. Buffer, process, etc.) appear valid in browser (apps/web/src) and Deno (functions/) code, which reduces linting’s ability to catch environment-specific mistakes. Consider scoping globals by runtime (browser/Deno vs Node tooling/tests) instead of enabling both everywhere.
  // Node/browser globals
  {
    languageOptions: {
      globals: {
        ...globals.browser,
        ...globals.node,
      },
    },
  },

@abhigyan1102
abhigyan1102 requested a lite review from Copilot August 14, 2026 08:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@abhigyan1102
abhigyan1102 merged commit 08e820d into main Aug 14, 2026
4 checks passed
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.

2 participants