Ci/toolchain hardening - #28
Conversation
- add eslint + typescript-eslint + eslint-plugin-react-hooks with exhaustive-deps as error, guarding the hand-maintained effect dependency array - add lint / typecheck / format:check scripts - switch moduleResolution to bundler so the exports map is validated during development - delete .prettierrc.cjs which was fully shadowed by .prettierrc
…ication - run lint, typecheck, and prettier check before tests - drop the duplicate plain test run (coverage run already executes the suite) - add compat job testing React 17 (with RTL 12) and React 18; React 19 stays covered by the quality job - verify all four dist artifacts and run arethetypeswrong after build - add workflow permissions and concurrency cancellation - add weekly dependabot updates for npm (root + example) and github-actions
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe pull request adds ESLint, typecheck, and formatting commands; updates TypeScript module resolution; expands CI with quality, React compatibility, artifact, and type checks; documents commands; and configures weekly Dependabot updates. ChangesQuality tooling and CI validation
Dependency update automation
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant Quality
participant Compat
participant Build
GitHubActions->>Quality: Run lint, typecheck, and format checks
Quality->>Compat: Run tests for React 17 and 18
Quality->>Build: Satisfy build dependency
Build->>GitHubActions: Verify artifacts and package types
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR hardens the project’s CI/toolchain by adding static quality gates (lint/typecheck/format), expanding CI coverage across React majors the package claims to support, and adding additional build/type-artifact verification.
Changes:
- Add ESLint (flat config), TypeScript typecheck, and Prettier format checks, and run them in CI before tests.
- Add a React 17/18 compatibility matrix job, plus stronger build artifact validation and
arethetypeswrongchecks. - Add Dependabot configuration and update TS module resolution to
bundler; remove the redundant Prettier CJS config.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Switch moduleResolution to bundler for modern TS/Vite-style resolution. |
| pnpm-lock.yaml | Lockfile updates for ESLint + typescript-eslint + react-hooks plugin. |
| package.json | Add format:check, lint, typecheck scripts and new lint/typecheck devDependencies. |
| eslint.config.mjs | Introduce ESLint flat config (ts-eslint + react-hooks rules). |
| CLAUDE.md | Document new commands for CI parity (format:check/lint/typecheck). |
| .prettierrc.cjs | Remove redundant Prettier config file. |
| .github/workflows/ci.yml | Add permissions/concurrency, add quality steps, add React compat job, verify build artifacts + types. |
| .github/dependabot.yml | Add weekly Dependabot updates (root, example, GitHub Actions). |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Comments suppressed due to low confidence (2)
.github/workflows/ci.yml:83
- Same Node engine constraint applies to the compat job (ESLint deps in the lockfile require Node >=20.19.0). Pin Node to
20.19.xhere as well to avoid failures when20.xresolves to an older patch.
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'pnpm'
.github/workflows/ci.yml:126
- The new ESLint toolchain (eslint@10 / @eslint/js@10) declares
engines.node>=20.19.0, so running the build job on an older Node 20.x patch can break installs/runs. Pin Node to20.19.x(or newer) to match the declared engine constraint and avoid flaky failures.
- name: Check for build artifacts
run: |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile |
Summary
exhaustive-depsas error guards the hand-maintained effect dependency arraypnpm testrun (coverage run already executes the suite)permissions/concurrency, weekly Dependabot (npm root + example, github-actions).prettierrc.cjs(dead config shadowed by.prettierrc), switch tsconfig tomoduleResolution: bundlerNo source changes — dist output is byte-identical, so no release needed (merge only).
요약
exhaustive-deps를 error로 설정해 수동 관리 중인 effect 의존성 배열을 보호pnpm test실행 제거 (커버리지 실행이 이미 전체 테스트 수행)permissions/concurrency추가, 주간 Dependabot 설정 (npm 루트+예제, github-actions).prettierrc.cjs삭제, tsconfigmoduleResolution: bundler로 전환Summary by CodeRabbit
Quality Improvements
Maintenance
Documentation