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

Experiment with YAML formatter #462

Closed
wants to merge 3 commits into from
Closed

Experiment with YAML formatter #462

wants to merge 3 commits into from

Conversation

IndrajeetPatil
Copy link
Contributor

No description provided.

@IndrajeetPatil
Copy link
Contributor Author

@lorenzwalthert I think this is working as expected, but because this PR itself contains changes to a YAML config file, which itself will be modified by this hook, there seems to be problems committing the changes.

Related to #448.

@IndrajeetPatil
Copy link
Contributor Author

You can have a look at its formatting here.

TBH, I am not sure if this is the hook to go with, since its formatting conflicts with VS Code's formatter.

@lorenzwalthert
Copy link
Owner

TBH, I am not sure if this is the hook to go with, since its formatting conflicts with VS Code's formatter.

Is the VS code formatter exposed as a CLI tool somewhere?

@lorenzwalthert
Copy link
Owner

lorenzwalthert commented Dec 16, 2022

Plus it's not auto-fixing? Like is it checking if the format is correct or also changing the files?

@IndrajeetPatil
Copy link
Contributor Author

It did change the files initially. I think now it's not doing so because precommit is failing due to some other hooks failing.

VS code uses prettier, and I see this mirror for it meant to be used with precommit:

https://github.com/pre-commit/mirrors-prettier

@lorenzwalthert
Copy link
Owner

I don't see other hooks faililng in the latest run. Also, then I guess prettier is the better bet since it's so much more popular than the other repo and my initial favorite has not yet established a pre-commit hook.

@IndrajeetPatil
Copy link
Contributor Author

Sounds good to me. Closing this.

@IndrajeetPatil IndrajeetPatil deleted the yaml_formatter branch December 16, 2022 17:32
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