Skip to content

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Oct 6, 2025

PR Checklist

Overview

Consists of two main commits:

  1. c65e3a9: Switches the format:prettier task to apply to all files, properly .prettierignores ones we don't want to format, and adds formatting enforcement to CI
  2. 4db34cc: Runs npm run format:prettier -- --write

If we wanted to, we could preserve the commits from this PR and add 4db34cc to a .git-blame-ignore-revs file. I'm personally slightly against that because that would add yet another new root-level file to the repo, which makes it just a little more daunting to read through. I would have even preferred to not add another Prettier config file here. Sigh.

🤎

@JoshuaKGoldberg JoshuaKGoldberg changed the title Prettier formatting chore: applied formatting to all files Oct 6, 2025
@mark-wiemer
Copy link
Member

mark-wiemer commented Oct 12, 2025

Looks good as-is, but bonus points if we also upgrade prettier to 3.6.2 (pinning exact version, not ^3.6.2, Prettier does not follow semver) and remove most of the Prettier rules in package.json:

// current rules vs defaults in Prettier 3.6.2
// https://prettier.io/docs/options
  "prettier": {
    "arrowParens": "avoid", // defaults to `always`
    "bracketSpacing": false, // defaults to `true`
    "endOfLine": "auto", // defaults to `lf`
    "singleQuote": true, // defaults to `false`
    "trailingComma": "none" // defaults to `all`, works only on Node v8+ and any browser supporting ES2017
    // suggest keeping this the same to be safe
  },

I think the defaults are better than our customizations in all these scenarios.

Again, happy to approve and merge this one without changes, but the way I see it, if we're going to change formatting, let's do it all in one go to minimize the Git history bloat.

Definitely do NOT want .git-blame-ignore-revs, agree there are already too many top-level files. I've researched it and found these two issues to help us get rid of .prettierignore in the future:

Not much traction on either of them though, but we can always do the work ourselves ;) (very low priority from me!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🛠 Repo: Files are inconsistently formatted with Prettier

2 participants