JoshuaKGoldberg / JoshuaKGoldberg/create-typescript-app

🛠 Tooling: Add a bot that suggests auto-formatting

Open
#139 12 comments 2 reactions 0 assignees View on GitHub
area: tooling status: accepting prs
Dominant language
TypeScript
Stars
1.4k
Forks
89
Avg merge
1m
Merged PRs (30d)
3

Description

### Bug Report Checklist

- [X] I have tried restarting my IDE and the issue persists.
- [X] I have pulled the latest `main` branch of the repository.
- [X] I have [searched for related issues](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aissue) and found none that matched my issue.

### Overview

Sometimes folks make edits in an environment without Git hooks, such as the web editor (or they use `git commit --no-verify`). Their commits and PRs will have big red ❌s complaining about formatting issues. Asking them to run Prettier might be too difficult; asking them to make manual edits might be too tedious.

Let's add a bot that offers to apply Prettier fixing for them. It should explain what the formatting needs are and have something like 'react with 👍' and/or 'reply with _yes_' to trigger.

~Edit: maybe not that last bit around having them react/reply? Maybe that can be an addon later? Honestly I haven't put _too_ much thought into the UX of it.~ No, I really want this to be an opt-in thing. Folks who don't understand Git/GitHub well sometimes have a hard time updating their local branch from the upstream/origin.

### Additional Info

This will be particularly useful for projects such as https://github.com/OpenContributionsProject/opensourcecontributionssite that are intended to have non-programmer folks participate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.