Two new CLI options have been added for a caching system similar to ESLint's one.
When you want to format only changed files, you can run Prettier with --cache
flag. Enabling this flag can dramatically improve running time.
prettier --write --cache src
Strategy for the cache to use for detecting changed files. Can be either metadata
or content
. If no strategy is specified, metadata will be used.
prettier --write --cache --cache-strategy content src