Decide whether to adopt a code formatter (Prettier or oxfmt)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- Active
- Stack technique
- typescript
- Domaine
- tooling
Piste de recherche
Start by reviewing the formatter measurements and the context in #46 and #109, then consider the rebase impact on #50 and #51. This issue is done when maintainers decide whether to adopt a formatter or defer; if they choose adoption, the issue lists .git-blame-ignore-revs and the lint-and-types job as places to update.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
The question
Should this repo adopt an automatic code formatter? Opening this with the measurements already taken, so whoever decides has the numbers to hand rather than having to gather them again.
My read, offered as input rather than a conclusion: the code already looks consistent, and adopting Prettier today would reformat roughly two-thirds of the codebase. That seems like a lot of churn for something nothing is currently flagging, so I'd lean toward holding — but the figures are below and the call is very much the maintainers'.
What was measured
Prettier 3.9.6, configured to match the style the repo already uses (semi: false, singleQuote: true), run over all 518 tracked .ts/.tsx files:
printWidth |
Files reformatted |
|---|---|
| 80 (default) | 465 / 518 |
| 100 | 377 / 518 |
| 120 | 340 / 518 |
| 140 | 333 / 518 |
At printWidth: 120 that is 340 files, 7,928 insertions, 4,084 deletions — roughly 12,000 lines of pure churn. There's no setting that makes it small; the floor is about 64% of the codebase.
The reformatted tree does still pass tsc --noEmit, so this is safe, just enormous.
Two concerns I checked that turned out not to apply
Noting these in case they'd otherwise be assumed to be blockers:
- Whether it reintroduces the dependency problem that drove the ESLint → oxlint swap. It doesn't appear to — Prettier 3.9.6 has zero runtime dependencies, so it shouldn't be able to pull in the
minimatch@3→brace-expansionchain that motivated that swap. - Whether it would fight the linter. It doesn't look like it — none of the 132 current oxlint warnings are formatting-related.
What gives me pause
- No problem is being reported. The code is hand-formatted but genuinely consistent. Nothing in lint output, review, or CI is complaining about style.
git blamecost is unusually high here. This codebase leans hard on explanatory comments and commit archaeology — a lot of the "why" lives in blame and ingit showat a specific ref, not just in the current file. Scrambling blame across 64% of files taxes the thing this repo is unusually good at.- It conflicts with everything in flight — #50, #51, and any open branch would need rebasing through a 12,000-line reformat.
If we do it anyway
The low-regret path:
- Land it as one isolated commit that changes nothing else.
- Add that commit SHA to
.git-blame-ignore-revssogit blameskips it. - Merge when no PRs are open.
- Add
prettier --checkto thelint-and-typesjob so it can't drift afterward.
The other option
oxfmt — oxc's own formatter, same toolchain already chosen for linting — would be the natural fit and avoids running two independent tools with their own opinions. It's at 0.66.0 as of 2026-09-06, so pre-1.0. Probably worth revisiting once it stabilises rather than adopting Prettier now and migrating later.
Context
Came up while working #46 / #109.
- Langage dominant
- TypeScript
- Étoiles
- 16
- Forks
- 2
- Merge moyen
- 8 h 56 min
- PR mergées (30 j)
- 126
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de answerLoops/answerLoops
-
Widget: match the chat bubble color to the rest of the widgetPeut-être pris @uchiha-suraj l’a pris il y a 10 jours. Ouverteenhancement help wanted
Difficulté 1/5 1-3 heures Accessibilité débutants 84/100
answerLoops/answerLoops#345 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Widget: make the chat window fit on small phonesPeut-être pris @anushreemehta6 l’a pris il y a 11 jours. Ouverteenhancement good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
answerLoops/answerLoops#344 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
answerLoops/answerLoops#17 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Make every dashboard stat card link to the page behind its numberPeut-être pris @delusional-whispers l’a pris aujourd’hui. Ouverteenhancement good first issue help wanted
answerLoops/answerLoops#404 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de answerLoops/answerLoops
Issues similaires
-
Edit: Travel Mix (RO)Ouvertecheck:failed streams:edit
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
iptv-org/iptv#55901 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 2 jours
-
package:ios ships XCFrameworks with absolute symlinks, which SwiftPM refuses to extractPeut-être pris @cusnirvladislav l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
callstackincubator/rock#740 ·
-
S: triage
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 2 jours
-
RED ladder stopped @ 4db4ed91Ouvertearea:workflow bug ready-for-human
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
fil-donadoni/tolaria#6108 ·
Les mainteneurs répondent en général sous 1 jour