taiwangoldcard / website

Taiwan Gold Card Community website
https://taiwangoldcard.com
Other
43 stars 18 forks source link

Code formatting #147

Open geekyme opened 4 years ago

geekyme commented 4 years ago

As we get more contributions to this repo, I think its best to have automated code formatting. Prettier is a good option.

See this link for tips on how to configure it with go templates (the syntax that hugo use) https://discourse.gohugo.io/t/hugo-and-prettier/22596

RohitDhatrak commented 4 years ago

@geekyme I have added the following configuration should I create a PR? { "useTabs": false, "trailingComma": "es5", "tabWidth": 4, "semi": false, "singleQuote": true, "overrides": [ { "files": ["*.html"], "options": { "parser": "go-template" } } ] }

geekyme commented 4 years ago

Sure please go ahead! Thank you! We'll need to probably have some git commit hooks as well.