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

Code formatting #147

Open
geekyme opened this issue Sep 28, 2020 · 2 comments
Open

Code formatting #147

geekyme opened this issue Sep 28, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@geekyme
Copy link
Collaborator

geekyme commented Sep 28, 2020

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

@geekyme geekyme added enhancement New feature or request good first issue Good for newcomers labels Sep 28, 2020
@RohitDhatrak
Copy link
Contributor

RohitDhatrak commented Oct 2, 2020

@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
Copy link
Collaborator Author

geekyme commented Oct 2, 2020

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

matrinox added a commit that referenced this issue Sep 13, 2021
#147 added prettier configuration file for automated code formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants