digitalocean / nginxconfig.io

⚙️ NGINX config generator on steroids 💉
https://do.co/nginxconfig
MIT License
27.42k stars 2.01k forks source link

Add prettier and run prettier command via lint-staged #448

Closed maskeynihal closed 9 months ago

maskeynihal commented 9 months ago

Type of Change

What issue does this relate to?

resolves #447

What should this PR do?

What are the acceptance criteria?

maskeynihal commented 9 months ago

here are the changes that are made by prettier. https://github.com/maskeynihal/nginxconfig.io/pull/1

should I also push the changes? @MattIPv4?

the test failing should fixed by the changes.

MattIPv4 commented 9 months ago

I think you'll probably want to add a dedicated test step for prettier -- eslint is definitely not flagging all the issues.

And yeah, a commit with all the changes prettier wants would be good as well.

maskeynihal commented 9 months ago

@MattIPv4 All the checks are passing.

I think you'll probably want to add a dedicated test step for prettier

I didn't get what you meant by this.

MattIPv4 commented 9 months ago

You'll want to add a new GitHub Actions test check for prettier -- eslint did fail, but it definitely did not fail with everything that prettier wanted to change.

maskeynihal commented 9 months ago

@MattIPv4 I have added github action to check code by prettier.

Should we restrict the use of the "prettier" check to only .js and .vue files, or should we also apply it to other file types such as .md, .json, and so on?

Thanks for taking the time to look into the PR.

maskeynihal commented 9 months ago

@MattIPv4 Would you mind adding the "hacktoberfest" tag to this PR if you can? It would be fantastic for keeping track of contributions during Hacktoberfest, but don't worry if you can't. I'm thrilled to contribute either way!

MattIPv4 commented 9 months ago

The repository already has the hacktoberfest topic, that is all that is needed for contributions to be counted for it. Adding a hacktoberfest label to a PR does absolutely nothing in the context of Hacktoberfest.

maskeynihal commented 9 months ago

@MattIPv4 Gotcha. Thanks. Previously it was showing Not-Accepted in my profile but now it's working fine.

Thanks once again.