Skip to content

chore: integrate lefthook & commitlint#223

Merged
artus9033 merged 2 commits into
mainfrom
lefthook
Jul 6, 2026
Merged

chore: integrate lefthook & commitlint#223
artus9033 merged 2 commits into
mainfrom
lefthook

Conversation

@artus9033

Copy link
Copy Markdown
Contributor

This PR:

  • integrates lefthook and commitlint to lint commit messages, typecheck & lint files
  • lefthook will lint in fix mode (i.e., rewrite) files on pre-commit to ensure no non-aligned formatting is committed
  • typecheck so far would not pass due to invalid type imports from react-native (was: CodegenTypes.js from Flow, is: CodegenTypesNamespace.d.ts - proper type declarations), which has been addressed

@artus9033
artus9033 requested review from Copilot and grabbou July 3, 2026 19:45
@artus9033 artus9033 self-assigned this Jul 3, 2026
@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ai Ready Ready Preview, Comment Jul 3, 2026 7:45pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds repository-wide Git hooks via Lefthook (pre-commit and commit-msg) and introduces a Commitlint configuration for conventional commit enforcement, while also updating React Native codegen type imports to align with the current TypeScript declaration paths.

Changes:

  • Add Lefthook installation and a lint:fix script, and configure hooks to auto-fix staged files and run typechecks pre-commit.
  • Add Commitlint configuration to enforce conventional commit messages on commit-msg.
  • Update React Native internal codegen type imports from CodegenTypes to CodegenTypesNamespace to restore typecheck compatibility.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/mlc/src/NativeMLCEngine.ts Updates RN codegen type import path to CodegenTypesNamespace.
packages/apple-llm/src/NativeAppleSpeech.ts Updates RN codegen type import path to CodegenTypesNamespace.
packages/apple-llm/src/NativeAppleLLM.ts Updates RN codegen type import path to CodegenTypesNamespace.
packages/adk/src/NativeAdkEngine.ts Updates RN codegen type import path to CodegenTypesNamespace.
package.json Adds Lefthook install on prepare and introduces lint:fix; adds Lefthook devDependency.
lefthook.yml Defines pre-commit (eslint --fix + typecheck) and commit-msg (commitlint) hooks.
commitlint.config.js Adds conventional Commitlint configuration.
bun.lock Locks Lefthook dependency resolution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@grabbou grabbou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. The type import fix is consistent, CI is green, and the lefthook config validates.

@artus9033
artus9033 merged commit 7610f44 into main Jul 6, 2026
9 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.

3 participants