Fixed a configuration error in the hooks Chinese guide#77
Open
ytche wants to merge 1 commit intoluongnv89:mainfrom
Open
Fixed a configuration error in the hooks Chinese guide#77ytche wants to merge 1 commit intoluongnv89:mainfrom
ytche wants to merge 1 commit intoluongnv89:mainfrom
Conversation
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.
Description
Fixed a configuration error in the hooks Chinese guide (zh/06-hooks/README.md). The
hooksfield was incorrectly defined as a string array instead of an object array,causing Claude Code to throw an error when users applied this configuration.
Type of Change
Related Issues
Changes Made
hooksfield from string array to object array inPreToolUseexamplehooks: [{ type, command}]What to Review
hooksfield now contains proper object structureFiles Changed
zh/06-hooks/README.mdTesting
How have you tested this?
Checklist
Screenshots or Examples
Before (incorrect):
{ "PreToolUse": [{ "matcher": "Write", "hooks": ["~/.claude/hooks/format-code.sh"] }] }After (correct)
{ "PreToolUse": [ { "matcher": "Write", "hooks": [ { "type": "command", "command": "~/.claude/hooks/format-code.sh" } ] } ] }Breaking Changes
Does this change any existing content or behavior?
If yes, please describe:
Additional Notes
Thanks for your open source spirit!