You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the default pre-commit hooks has a pretty-format JSON hook, it is has some serious customizability/prettifying issues that seem to be out of scope: pre-commit/pre-commit-hooks#521 and there is blocking my adoption of using that. Perhaps adding a more feature-ful, customizable JSON prettifier to this repository would be appropriate.
@CAM-Gerlach any interest? This blocks my auto-formatting of JSONs.
Since JSONs can't have comments we don't have to worry about #26 at the very least. Perhaps there is an easy fix in JSON.dumps that I am unaware regarding spitting out short-arrays.
The text was updated successfully, but these errors were encountered:
@Skylion007 I would be against having redundant pre-commit hooks.
Additionally having tools with many configurations usually leads to have very custom formats that goes beyond the idea of having a "standard" way of formatting the file (examples are the black formatter or go fmt which give almost no configuration options).
This repository was initially introduced to provide a sort of opinionated way of formatting/making-prettier some formats that were not supported by the default pre-commit hooks (pre-commit/pre-commit-hooks#307).
Said so, I have no plans on supporting customised JSON formatting (especially considering that the added work would have, in my opinion, very limited adoption).
Sorry, if this might not look like the answer you were looking for but we would like to focus on what makes developers effective and not opening the way for internal discussions as "I want arrays to be split", "I want this line length", etc.
Still, if you feel like this is important for your usecase you can:
create the formatting rule as local rule so you can test it out
[eventually] open a PR to this repo and we'll be checking what impact it is introducing in terms of size as well as maintenance costs
While the default pre-commit hooks has a pretty-format JSON hook, it is has some serious customizability/prettifying issues that seem to be out of scope: pre-commit/pre-commit-hooks#521 and there is blocking my adoption of using that. Perhaps adding a more feature-ful, customizable JSON prettifier to this repository would be appropriate.
@CAM-Gerlach any interest? This blocks my auto-formatting of JSONs.
Since JSONs can't have comments we don't have to worry about #26 at the very least. Perhaps there is an easy fix in JSON.dumps that I am unaware regarding spitting out short-arrays.
The text was updated successfully, but these errors were encountered: