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

Add args to prettier hook #388

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

totoroot
Copy link
Collaborator

Add pretty much all available options/command line arguments to the prettier hook.

See all CLI flags for prettier here.
See all options for prettier here.

That both --write and --ignore-unknown were set to true by default, deviates from prettier's default behaviour.
Especially defaulting to overwriting files by setting --write seems unwanted for a pre-commit hook so the default is now set to false.

--ignore-unknown can be set via option now, but also defaults to false.

The output option was removed in favour of having check and list-different as separate options.
check defaults to true, so that prettier can be used sensibly as a pre-commit hook.

If a user prefers the output format of list-different, they now have the option to enable it.

@totoroot totoroot force-pushed the add-args-to-prettier-hook branch from 28a4c8f to 02a4595 Compare January 12, 2024 10:31
@totoroot
Copy link
Collaborator Author

Added a patch file by accident. Removed it.

All introduced options were thoroughly tested.
Ready for review.

@totoroot totoroot requested a review from domenkozar January 12, 2024 10:33
@domenkozar domenkozar merged commit 54d60d1 into cachix:master Jan 12, 2024
4 checks passed
@totoroot totoroot deleted the add-args-to-prettier-hook branch January 12, 2024 11:28
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