JoshuaKGoldberg / JoshuaKGoldberg/TypeStat
Repo: Use the user's formatter on written config files, not JSON.stringify
Open
status: accepting prs
type: enhancement
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 47
- Avg merge
- 15h 55m
- Merged PRs (30d)
- 21
Description
A few places in code use `JSON.stringify()` to write files on disk. For example:
https://github.com/JoshuaKGoldberg/TypeStat/blob/1031fb8fd01b6d52b3781a77b5155d5c899ef54c/src/initialization/initializeJavaScript/index.ts#L19
https://github.com/JoshuaKGoldberg/TypeStat/blob/1031fb8fd01b6d52b3781a77b5155d5c899ef54c/src/initialization/initializeTypeScript/writeMultiTypeScriptConfig.ts#L22
Instead, we should call to ~~`prettier` and use whatever Prettier~~ whatever formatter & config the user has defined. I have a project for that: https://github.com/JoshuaKGoldberg/formatly
Contributor guide
Assessment
This issue has not been assessed yet.