Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pre-commit:
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

Consider adding a comment at the top of the lefthook configuration file to explain its purpose and how to set it up. For example:

# Lefthook configuration for git hooks
# Runs formatting before commits to ensure code quality
# Install hooks by running: yarn install (or npx lefthook install)

This helps other developers understand the purpose of this file and how to use it.

Copilot uses AI. Check for mistakes.
parallel: true
jobs:
- run: yarn format
Comment on lines +3 to +4
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

Incorrect syntax for lefthook configuration. The jobs array syntax is not valid for lefthook v2. Job commands should be defined as named keys, not as array items.

The correct syntax should be:

pre-commit:
  parallel: true
  commands:
    format:
      run: yarn format
      stage_fixed: true

Alternatively, you can use the shorter syntax:

pre-commit:
  commands:
    format:
      run: yarn format
      stage_fixed: true
Suggested change
jobs:
- run: yarn format
commands:
format:
run: yarn format

Copilot uses AI. Check for mistakes.
stage_fixed: true
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"chokidar": "^4.0.3",
"dotenv": "^16.4.7",
"jsdom": "^26.1.0",
"lefthook": "^2.0.4",
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

Missing postinstall script to install lefthook git hooks. After adding lefthook as a dependency, developers need to run lefthook install to actually install the git hooks. Without this, the pre-commit hook won't be activated.

Consider adding a postinstall script to package.json:

"scripts": {
  "postinstall": "lefthook install"
}

This ensures the git hooks are automatically installed when developers run yarn install.

Copilot uses AI. Check for mistakes.
"lightningcss": "^1.30.1",
"prettier": "^3.6.2",
"reanalyze": "^2.16.0",
Expand Down
112 changes: 112 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5662,6 +5662,117 @@ __metadata:
languageName: node
linkType: hard

"lefthook-darwin-arm64@npm:2.0.4":
version: 2.0.4
resolution: "lefthook-darwin-arm64@npm:2.0.4"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"lefthook-darwin-x64@npm:2.0.4":
version: 2.0.4
resolution: "lefthook-darwin-x64@npm:2.0.4"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"lefthook-freebsd-arm64@npm:2.0.4":
version: 2.0.4
resolution: "lefthook-freebsd-arm64@npm:2.0.4"
conditions: os=freebsd & cpu=arm64
languageName: node
linkType: hard

"lefthook-freebsd-x64@npm:2.0.4":
version: 2.0.4
resolution: "lefthook-freebsd-x64@npm:2.0.4"
conditions: os=freebsd & cpu=x64
languageName: node
linkType: hard

"lefthook-linux-arm64@npm:2.0.4":
version: 2.0.4
resolution: "lefthook-linux-arm64@npm:2.0.4"
conditions: os=linux & cpu=arm64
languageName: node
linkType: hard

"lefthook-linux-x64@npm:2.0.4":
version: 2.0.4
resolution: "lefthook-linux-x64@npm:2.0.4"
conditions: os=linux & cpu=x64
languageName: node
linkType: hard

"lefthook-openbsd-arm64@npm:2.0.4":
version: 2.0.4
resolution: "lefthook-openbsd-arm64@npm:2.0.4"
conditions: os=openbsd & cpu=arm64
languageName: node
linkType: hard

"lefthook-openbsd-x64@npm:2.0.4":
version: 2.0.4
resolution: "lefthook-openbsd-x64@npm:2.0.4"
conditions: os=openbsd & cpu=x64
languageName: node
linkType: hard

"lefthook-windows-arm64@npm:2.0.4":
version: 2.0.4
resolution: "lefthook-windows-arm64@npm:2.0.4"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"lefthook-windows-x64@npm:2.0.4":
version: 2.0.4
resolution: "lefthook-windows-x64@npm:2.0.4"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard

"lefthook@npm:^2.0.4":
version: 2.0.4
resolution: "lefthook@npm:2.0.4"
dependencies:
lefthook-darwin-arm64: "npm:2.0.4"
lefthook-darwin-x64: "npm:2.0.4"
lefthook-freebsd-arm64: "npm:2.0.4"
lefthook-freebsd-x64: "npm:2.0.4"
lefthook-linux-arm64: "npm:2.0.4"
lefthook-linux-x64: "npm:2.0.4"
lefthook-openbsd-arm64: "npm:2.0.4"
lefthook-openbsd-x64: "npm:2.0.4"
lefthook-windows-arm64: "npm:2.0.4"
lefthook-windows-x64: "npm:2.0.4"
dependenciesMeta:
lefthook-darwin-arm64:
optional: true
lefthook-darwin-x64:
optional: true
lefthook-freebsd-arm64:
optional: true
lefthook-freebsd-x64:
optional: true
lefthook-linux-arm64:
optional: true
lefthook-linux-x64:
optional: true
lefthook-openbsd-arm64:
optional: true
lefthook-openbsd-x64:
optional: true
lefthook-windows-arm64:
optional: true
lefthook-windows-x64:
optional: true
bin:
lefthook: bin/index.js
checksum: 10c0/7283dacf89d5ceeffbc782157e8d0416210ad8550226105c2499ca170f02bfdd5c5045c0faf03755a2d5bb129df7102a9508384aae797d24c59830d63d76a964
languageName: node
linkType: hard

"levenshtein-edit-distance@npm:^1.0.0":
version: 1.0.0
resolution: "levenshtein-edit-distance@npm:1.0.0"
Expand Down Expand Up @@ -8134,6 +8245,7 @@ __metadata:
highlightjs-rescript: "npm:^0.2.2"
isbot: "npm:^5"
jsdom: "npm:^26.1.0"
lefthook: "npm:^2.0.4"
lightningcss: "npm:^1.30.1"
lz-string: "npm:^1.5.0"
mdast-util-from-markdown: "npm:^2.0.2"
Expand Down