JoshuaKGoldberg / JoshuaKGoldberg/TypeStat

Repo: Use the user's formatter on written config files, not JSON.stringify

Open
#1,066 2 comments 0 reactions 0 assignees View on GitHub
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

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.