colbyfayock / next-wordpress-starter

📝 Bring WordPress to the static world with Next.js
https://next-wordpress-starter.spacejelly.dev
MIT License
1.16k stars 289 forks source link

Make a workflow for automatic formating #412

Closed Aatmaj-Zephyr closed 1 year ago

Aatmaj-Zephyr commented 1 year ago

Make a GitHub workflow which will format all files when pucshed to the main branch.

Aatmaj-Zephyr commented 1 year ago

Pls assign me this issue for hacktoberfest

colbyfayock commented 1 year ago

thanks @Aatmaj-Zephyr - though I prefer formatting to happen precommit

this is currently set up to happen using husky, but I welcome any ideas for improvements

https://github.com/colbyfayock/next-wordpress-starter/blob/main/.husky/pre-commit

Aatmaj-Zephyr commented 1 year ago

This action can be used as workflow- https://github.com/marketplace/actions/prettier-action

colbyfayock commented 1 year ago

Right but this would still happen on GitHub and apply a new commit in the automation correct? So it's still not happening precommit

Aatmaj-Zephyr commented 1 year ago

Yes

colbyfayock commented 1 year ago

Closing this for now as I don't currently have any intent on running formatting in an Action. Thanks for the idea though.