whtsky / pre-commit-pretty-format-json5

A pre-commit hook that checks that all your JSON5 files are pretty.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not remove JSON5 comments

MaxymVlasov opened this issue · comments

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

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