Skip to content

Conversation

@karamaru-alpha
Copy link

@karamaru-alpha karamaru-alpha commented Mar 25, 2025

Summary

Enabled Prettier's cache option to reduce execution time.
The cache file is located at ./node_modules/.cache/prettier/.prettier-cache, and subsequent executions will only target files with modified file hashes.

Before After(cached)
1.4s
$ time npm run format:check
> npm run format:check  3.06s user 0.20s system 227% cpu 1.433 total
0.2s
$ time npm run format:check
> npm run format:check  0.24s user 0.08s system 105% cpu 0.299 total

Appendix

cf. https://prettier.io/docs/cli#--cache

@karamaru-alpha karamaru-alpha changed the title chore: enable prettier cache chore: enable prettier's cache Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant