dotansimha / dotansimha/graphql-code-generator
Allow running prettier/formatting before writing to disk
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
**Is your feature request related to a problem? Please describe.**
After https://github.com/dotansimha/graphql-code-generator/releases/tag/v1.6.0, we've used a hook with `afterAllFileWrite: prettier --write`. The problem is that since this applies after files have been written to disk, all watchers are triggered even if the content is identical, then when that run is complete (riddled with lint errors that take a long time for webpack to render), the watcher is triggered again since the files have been formatted.
**Describe the solution you'd like**
A hook that runs before files are written to disk that allows us to format the content using the tool of our choice (e.g. prettier or eslint).
**Describe alternatives you've considered**
N/A
**Additional context**
N/A
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.