Skip to content

feat: Update pre-commit configuration, add CLAUDE.md, and implement JSON5 formatting features #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bossjones
Copy link

  • 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.

bossjones and others added 4 commits May 27, 2025 20:53
…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.
- 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.
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.

1 participant