![]() * Allow `--write` to be used with `--list-different` This makes it possible to simultaneously check for formatting errors and fix them, which can be useful for CI services. For example, a CI service could run: prettier --list-different --write $FILES || git diff --exit-code to show the formatting errors. Before this change, it would be necessary to do: prettier --list-different $FILES || (prettier --write $FILES; git diff --exit-code) Here are some commands which are useful to verify that the outputs and exit codes of `prettier --list-different` and `prettier --write` have not changed: ./bin/prettier.js --list-different index.js src/*.js bin/*.js; echo $? ./bin/prettier.js --write index.js src/*.js bin/*.js; echo $? * fixup! Allow `--write` to be used with `--list-different` |
||
---|---|---|
.. | ||
prettier.js |