Skip to content

chore: enable prettier's cache #1298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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