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

Add prettier formatting verification to CI #17

Closed
JoshuaKGoldberg opened this issue May 22, 2022 · 9 comments · Fixed by #26
Closed

Add prettier formatting verification to CI #17

JoshuaKGoldberg opened this issue May 22, 2022 · 9 comments · Fixed by #26
Labels
accepting prs Yes please, send a pull request! ♥ area: tooling Changes around repository management, such as CI, formatting, linting, and releases.

Comments

@JoshuaKGoldberg
Copy link
Contributor

.js, .json, .md, .ts, .tsx, and .yml should all be Prettier-ed. And the Github Actions builds should verify it. 🧹

@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Yes please, send a pull request! ♥ area: tooling Changes around repository management, such as CI, formatting, linting, and releases. labels May 22, 2022
@fuadop
Copy link
Contributor

fuadop commented May 23, 2022

@JoshuaKGoldberg about this, looks like prettier has to be set up from scratch for the repo ?

@fuadop
Copy link
Contributor

fuadop commented May 23, 2022

Do you have a specific prettier config you love ?

@JoshuaKGoldberg
Copy link
Contributor Author

JoshuaKGoldberg commented May 24, 2022

I normally just go with the default settings. Though for accessibility (see: prettier/prettier#7475) I'm planning on switching all my repos to use tabs instead of spaces. So just that one setting difference: useTabs: true.

@fuadop
Copy link
Contributor

fuadop commented May 24, 2022

Hey @JoshuaKGoldberg , I want to use the below configuration.. but the project codes (arrays, generics, etc.) .. don't follow the semi-colon rule.. which would make a whole lot of file change if I run prettier --write . . Is that okay ? or do I change the config to allow semi colon ?

{
  "trailingComma": "es5",
  "tabWidth": 4,
  "semi": false,
  "singleQuote": true,
  "useTabs": true
}

@JoshuaKGoldberg
Copy link
Contributor Author

Oh! Forgive me, I'd forgotten whether semi is enabled or not. I strongly prefer semicolons.

@fuadop
Copy link
Contributor

fuadop commented May 24, 2022

Yea I perfer semicolons too.

@fuadop
Copy link
Contributor

fuadop commented May 24, 2022

How about the tabWidth ? Do you like it as four ? or two ?

@JoshuaKGoldberg
Copy link
Contributor Author

Hmm, let's just go with the defaults.

@fuadop
Copy link
Contributor

fuadop commented May 25, 2022

Okay ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Yes please, send a pull request! ♥ area: tooling Changes around repository management, such as CI, formatting, linting, and releases.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants