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

Use JSON Formatter #653

Open
louwers opened this issue May 6, 2024 · 1 comment
Open

Use JSON Formatter #653

louwers opened this issue May 6, 2024 · 1 comment

Comments

@louwers
Copy link
Collaborator

louwers commented May 6, 2024

When programatically eiditing v8.json (and other JSON files), it would be helpful to use a JSON formatter so changes do not introduce unrelated (formatting) changes.

There are some options:

  1. Use an eslint plugin such as https://github.com/ota-meshi/eslint-plugin-jsonc

  2. Use the pretty-format-json hook of pre-commit https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#pretty-format-json

This has the advantage that we can enable pre-commit.ci which can automatically apply fixes on PRs (this is very convenient). But pre-commit is written in Python and it's another tool to introduce.

  1. Use https://github.com/lydell/json-stringify-pretty-compact to preserve short arrays on one line (a bit more readable).
@HarelM
Copy link
Collaborator

HarelM commented May 6, 2024

I prefer eslint, which I think somewhat is already in use for the typescript code.
I don't like pre-commit stuff as they annoy when you want to commit.
PR checks are sufficient, IMHO.

@louwers louwers reopened this May 6, 2024
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