Skip to content
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

Do not remove JSON5 comments #4

Open
MaxymVlasov opened this issue Jan 17, 2023 · 1 comment
Open

Do not remove JSON5 comments #4

MaxymVlasov opened this issue Jan 17, 2023 · 1 comment

Comments

@MaxymVlasov
Copy link

MaxymVlasov commented Jan 17, 2023

That's the main reason why folks choose JSON5 over JSON, but right now pre-commit-pretty-format-json5 acts as JSON5->JSON converter

@whtsky
Copy link
Owner

whtsky commented Jan 18, 2023

This hook is using json5 package now, which don't support preserving comment: dpranke/pyjson5#28

I'm not aware of any json5 library in python that support preserving comment. I'd suggest to use prettier if you want to keep comments

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

No branches or pull requests

2 participants