Decide whether to adopt a code formatter (Prettier or oxfmt)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 15/100
- Tipo de issue
- Refactorización
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- developer-experience
Línea de trabajo
This is a maintainer decision, not an implementation task: whether to adopt Prettier or wait for oxfmt, with measurements already in the body. Read the body and CONTRIBUTING.md, then check the lint-and-types CI job and the existing oxlint setup. Done means the maintainers record a decision; any formatting commit would come only after that and would need a .git-blame-ignore-revs entry.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Copied from DeadantCo/answerLoops#24 · originally opened by sethr07 on 2026-11-20
Copied from https://github.com/answerLoops/answerLoops/issues/112 — originally opened by
@FaithTarberton 2026-09-06
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.
Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DeadantCo/answerLoopsdev
-
Widget: match the chat bubble color to the rest of the widgetPosiblemente ocupada @sethr07 la tomó hoy. Abiertoenhancement frontend help wanted
Dificultad 2/5 Medio día Aptitud para principiantes 75/100
DeadantCo/answerLoopsdev#68 · 3 comentarios ·
-
Widget: make the chat window fit on small phonesPosiblemente ocupada @sethr07 la tomó hoy. Abiertoenhancement frontend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
DeadantCo/answerLoopsdev#67 · 9 comentarios ·
-
Add 'select all' option to Slack channel picker in SettingsPosiblemente ocupada @sethr07 la tomó hoy. Abiertofrontend good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
DeadantCo/answerLoopsdev#22 · 5 comentarios ·
-
enhancement frontend help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
DeadantCo/answerLoopsdev#141 ·
-
backend enhancement frontend help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
DeadantCo/answerLoopsdev#140 ·
Todos los issues de DeadantCo/answerLoopsdev
Issues similares
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
lingdojo/kana-dojo#34545 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
Blocklist addition requestAbiertoblocklist addition
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
MetaMask/eth-phishing-detect#315455 ·
Los mantenedores suelen responder en 1 día
-
area: telegram bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
griffinwork40/agent-afk#5275 ·
Los mantenedores suelen responder en 1 día
-
macOS: the Save Diagnostics panel goes behind the editor after an app switch and can't be reachedAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getopenscreen/openscreen#1667 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
erkamyaman/rust-anything#371 ·
Los mantenedores suelen responder en 1 día