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

chore: Silence prettier output unless error #400

Closed
wants to merge 4 commits into from

Conversation

honnix
Copy link
Contributor

@honnix honnix commented Oct 2, 2024

Silence prettier output unless error because it defaults to log that is too verbose: https://prettier.io/docs/en/cli.html#--log-level


Changes are visible to end-users: yes/no

  • Searched for relevant documentation and updated as needed: no update needed
  • Breaking change (forces users to change their own code or config): yes because users will no longer see detailed outputs
  • Suggested release notes appear below: yes

Prettier is now configured to by default log at error level.

Test plan

  • Covered by existing test cases

@@ -42,7 +42,7 @@ BUILTIN_TOOL_LABELS = {
CHECK_FLAGS = {
"buildifier": "-mode=check",
"swiftformat": "--lint",
"prettier": "--check",
"prettier": "--check --log-level error",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why error rather than warn?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no particular reason, I just happen to have that level patched. I think warn is a better one. Will fix.

@alexeagle alexeagle marked this pull request as ready for review October 2, 2024 14:37
@alexeagle
Copy link
Member

ah, you missed https://github.com/aspect-build/rules_lint/blob/main/example/tools/format/BUILD.bazel#L17-L21

prettier renamed this option at some point, so it belongs in "userland" where you know the flag name

@honnix
Copy link
Contributor Author

honnix commented Oct 2, 2024

ah, you missed main/example/tools/format/BUILD.bazel#L17-L21

prettier renamed this option at some point, so it belongs in "userland" where you know the flag name

Ah, this is nice! We will apply the same then. Thank you!

@honnix honnix closed this Oct 2, 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

Successfully merging this pull request may close these issues.

2 participants