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

Array format/style is being changed #789

Closed
Th3S4mur41 opened this issue May 2, 2024 · 3 comments
Closed

Array format/style is being changed #789

Th3S4mur41 opened this issue May 2, 2024 · 3 comments

Comments

@Th3S4mur41
Copy link

Th3S4mur41 commented May 2, 2024

We use @biomejs in our project to format JS and JSON files including package.json

As a result, arrays in the package.json are formatted as a single line:

{
  "keywords": ["webapp", "test", "whatever", "keywords", "and-some-more"],
  "workspaces": ["packages/*"],
}

When running semantic release, those arrays are being formatted to multi-line (regardless of the line length).
Which is leading to a the format check failing in CI.

{
  "keywords": [
    "webapp",
    "test",
    "whatever",
    "keywords",
    "and-some-more"
  ],
  "workspaces": [
    "packages/*"
  ],
}

I would expect that semantic release should only update the version, but not change the file's format/style.

@Th3S4mur41
Copy link
Author

@Conaclos FYI

@Th3S4mur41
Copy link
Author

Closing this, since the format is actually be changed by npm itself when running npm version

@Conaclos
Copy link

Conaclos commented May 2, 2024

I think it could make sense of adding an option to the Biome formatter to expand JSON (and thus match output of JSON.stringify). This could be used for config files.

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