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

for pretty-format-json add option: --empty-object-with-newline #945

Conversation

ascheucher-shopify-partner

In Shopify theme development, there is a GitHub bot which pulls in changes in GitHub repos.
Sadly it formats .json files in a non standard way. Hence, every empty object get's a newline, which doesn't not conform to standard formatting.
This creates then a new commit in the branch, which is pushed back into the origin repo. Which needs to be pulled to be able to push again. It's creating a cycle.

Hence, I created the formatting option --empty-object-with-newline to conform to the Shopify .json formatting to prevent commit pollution.

@asottile
Copy link
Member

please discuss features before spending time on them. this is far too specific to be added and supported

@asottile asottile closed this Aug 13, 2023
@asottile
Copy link
Member

you should fix the other thing rather than adding hacks here

@pre-commit pre-commit locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants