Repository navigation
build: run the pre-commit hook without a global prettier-standard - #26
Merged
Merged
Conversation
The *.js task called prettier-standard, which is not a dependency, so the hook failed unless it was installed by hand. Every task group also ran `git add`, and with .js and .md files staged together the groups raced on .git/index.lock. Use `npx @kikobeats/prettier-standard` as simple-wappalyzer does and drop the `git add` steps; nano-staged re-stages task output itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 23 minutes. View limit details
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 |
There was a problem hiding this comment.
html-scripts
Details
| Benchmark suite | Current: 4d956ff | Previous: 59fcf01 | Ratio |
|---|---|---|---|
getScripts 1MB page |
53.6 ms (51.9-55.7) |
54.5 ms (53.7-55) |
0.98 |
getScripts 20KB page |
69.4 ms (65.9-70.7) |
70 ms (67.9-71.4) |
0.99 |
This comment was automatically generated by workflow using github-action-benchmark.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
*.jstask innano-stagedcalledprettier-standard, which isn't a dependency, so the pre-commit hook failed on every.jscommit unless it was installed globally.git add. With.jsand.mdfiles staged together, the groups raced:fatal: Unable to create '.git/index.lock': File exists.Fix
The same config simple-wappalyzer uses:
npx @kikobeats/prettier-standard+standard --fixfor*.js,standard-markdownfor*.md,finepackforpackage.json. Nogit add; nano-staged re-stages task output itself ("Applying modifications from tasks").How it was tested
prettier-standardnot onPATH: I staged.js+.md+package.jsontogether and rannpx nano-staged5 times. Exit 0 every time, noindex.lockerrors.const probe = { a:1 }) came out staged asconst probe = { a: 1 }.npm test: 63 passed.🤖 Generated with Claude Code
Note
Low Risk
Only pre-commit tooling in package.json changed; no runtime or library behavior is affected.
Overview
Updates nano-staged pre-commit tasks so JS formatting no longer depends on a globally installed
prettier-standard. Staged*.jsfiles now runnpx @kikobeats/prettier-standardfollowed bystandard --fix, matching the approach used in simple-wappalyzer.Removes
git addfrom every task group (*.js,*.md,package.json). nano-staged re-stages formatter output on its own, which avoids parallel task groups fighting over.git/index.lockwhen multiple file types are staged at once.Reviewed by Cursor Bugbot for commit 4d956ff. Bugbot is set up for automated code reviews on this repo. Configure here.