Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 592 Bytes

13016.md

File metadata and controls

21 lines (17 loc) · 592 Bytes

[HIGHLIGHT] Do not save the cache if the --write option wasn't specified (#13016 by @Milly)

# Prettier stable
$ prettier --cache foo.js
# This shows formatted contents of `foo.js`.
# Then cache is created and `foo.js` is flagged as already formatted.

$ prettier --cache --write foo.js
foo.js 2ms (cached)
# "... (cached)" means the file is already formatted, so nothing is done this time.

# Prettier main
$ prettier --cache foo.js
# Show formatted contents of `foo.js`.

$ prettier --cache --write foo.js
foo.js 2ms
# `foo.js` is formatted now.