feat: Update pre-commit configuration, add CLAUDE.md, and implement JSON5 formatting features#5
Open
bossjones wants to merge 4 commits intowhtsky:mainfrom
Open
Conversation
…SON5 formatting features - Added `.claude/` to `.gitignore` to exclude Claude-related files. - Enhanced `.pre-commit-config.yaml` with additional hooks for pytest and improved formatting options. - Created `CLAUDE.md` to provide guidance on the project and its structure. - Introduced `Makefile` for simplified testing and fixing commands. - Implemented new functions in `pretty_format_json5.py` for handling unquoted keys, trailing commas, and preserving comments. - Updated `README.md` to reflect new features and usage instructions. - Added comprehensive test suite in `test_pretty_format_json5.py` to validate formatting behavior.
for more information, see https://pre-commit.ci
- Introduced a new `smoke-test` command in the `Makefile` to run the JSON5 formatting script on the VSCode settings file. - Updated `_format_value` and `_get_pretty_format` functions in `pretty_format_json5.py` to accept an `is_json5` parameter, allowing differentiation between JSON and JSON5 formatting. - Enhanced key formatting logic to ensure valid identifiers are unquoted in JSON5 files while enforcing quotes for JSON files. - Added a new test case in `test_pretty_format_json5.py` to validate that JSON files have all keys quoted, ensuring correct behavior for both JSON and JSON5 formats.
for more information, see https://pre-commit.ci
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.
.claude/to.gitignoreto exclude Claude-related files..pre-commit-config.yamlwith additional hooks for pytest and improved formatting options.CLAUDE.mdto provide guidance on the project and its structure.Makefilefor simplified testing and fixing commands.pretty_format_json5.pyfor handling unquoted keys, trailing commas, and preserving comments.README.mdto reflect new features and usage instructions.test_pretty_format_json5.pyto validate formatting behavior.