Skip to content

Ci/toolchain hardening - #28

Merged
umsungjun merged 3 commits into
mainfrom
ci/toolchain-hardening
Jul 28, 2026
Merged

Ci/toolchain hardening#28
umsungjun merged 3 commits into
mainfrom
ci/toolchain-hardening

Conversation

@umsungjun

@umsungjun umsungjun commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add lint / typecheck / format check steps to CI before tests (previously none existed)
  • Introduce ESLint flat config (typescript-eslint + react-hooks) — exhaustive-deps as error guards the hand-maintained effect dependency array
  • Add React 17/18 compat matrix job (React 17 leg pins RTL 12); React 19 stays covered by the main quality job — the "React 17–19 Compatible" claim is now actually tested
  • Verify all four dist artifacts and run arethetypeswrong after every build
  • Drop the duplicate plain pnpm test run (coverage run already executes the suite)
  • Add workflow permissions / concurrency, weekly Dependabot (npm root + example, github-actions)
  • Delete .prettierrc.cjs (dead config shadowed by .prettierrc), switch tsconfig to moduleResolution: bundler

No source changes — dist output is byte-identical, so no release needed (merge only).


요약

  • CI에 lint / typecheck / 포맷 검사 단계 추가 (기존엔 전무)
  • ESLint flat config 도입 (typescript-eslint + react-hooks) — exhaustive-deps를 error로 설정해 수동 관리 중인 effect 의존성 배열을 보호
  • React 17/18 호환성 매트릭스 잡 추가 (React 17 레그는 RTL 12 사용); React 19는 기존 quality 잡에서 커버 — "React 17–19 호환" 주장이 이제 실제로 테스트됨
  • 빌드 후 dist 산출물 4개 확인 + arethetypeswrong 검증 실행
  • 중복 pnpm test 실행 제거 (커버리지 실행이 이미 전체 테스트 수행)
  • 워크플로 permissions/concurrency 추가, 주간 Dependabot 설정 (npm 루트+예제, github-actions)
  • 죽은 설정 .prettierrc.cjs 삭제, tsconfig moduleResolution: bundler로 전환

Summary by CodeRabbit

  • Quality Improvements

    • Added automated linting, type checking, and formatting validation to CI.
    • Expanded compatibility testing across React 17 and React 18.
    • Strengthened build validation for generated packages and type definitions.
  • Maintenance

    • Added weekly automated dependency update checks.
    • Improved workflow reliability by managing permissions and canceling outdated runs.
  • Documentation

    • Documented the new formatting, linting, and type-checking commands.

- 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
Copilot AI review requested due to automatic review settings July 28, 2026 12:50
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-head-safe Ready Ready Preview, Comment Jul 28, 2026 12:50pm

@umsungjun
umsungjun merged commit a28e296 into main Jul 28, 2026
4 of 5 checks passed
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d6106e7f-22b6-4584-9cab-d8f6ae0b6691

📥 Commits

Reviewing files that changed from the base of the PR and between e84d1e6 and ed79887.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • .github/dependabot.yml
  • .github/workflows/ci.yml
  • .prettierrc.cjs
  • CLAUDE.md
  • eslint.config.mjs
  • package.json
  • tsconfig.json

📝 Walkthrough

Walkthrough

The 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.

Changes

Quality tooling and CI validation

Layer / File(s) Summary
Quality tooling and repository commands
eslint.config.mjs, package.json, tsconfig.json, CLAUDE.md
Adds lint, typecheck, and formatting commands, configures ESLint and React Hooks rules, changes module resolution to bundler, and documents the commands.
CI quality and compatibility gates
.github/workflows/ci.yml
Adds workflow permissions and concurrency cancellation, separates quality checks, and tests against React 17 and 18.
Build artifact and type validation
.github/workflows/ci.yml
Checks specific distribution files and validates dual-package types with @arethetypeswrong/cli.

Dependency update automation

Layer / File(s) Summary
Dependabot update schedules
.github/dependabot.yml
Configures weekly npm updates for the root project and basic example, plus GitHub Actions updates.

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

Suggested reviewers: copilot

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
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/toolchain-hardening

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.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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 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 arethetypeswrong checks.
  • 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.x here as well to avoid failures when 20.x resolves 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 to 20.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.

Comment thread .github/workflows/ci.yml
Comment on lines 35 to 36
- name: Install dependencies
run: pnpm install --frozen-lockfile
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.

3 participants