diff --git a/docs/options.md b/docs/options.md index 521f2cf18..87cc24f6e 100644 --- a/docs/options.md +++ b/docs/options.md @@ -346,7 +346,7 @@ If you want to make sure that your entire git repository only contains Linux-sty 1. Ensure Prettier’s `endOfLine` option is set to `lf` (this is a default value since v2.0.0) 1. Configure [a pre-commit hook](precommit.md) that will run Prettier -1. Configure Prettier to run in your CI pipeline using [`--check` flag](cli.md#check) +1. Configure Prettier to run in your CI pipeline using [`--check` flag](cli.md#check). If you use Travis CI, set [the `autocrlf` option](https://docs.travis-ci.com/user/customizing-the-build#git-end-of-line-conversion-control) to `input` in `.travis.yml`. 1. Add `* text=auto eol=lf` to the repo's `.gitattributes` file. You may need to ask Windows users to re-clone your repo after this change to ensure git has not converted `LF` to `CRLF` on checkout. diff --git a/website/blog/2020-03-21-2.0.0.md b/website/blog/2020-03-21-2.0.0.md index 173975f28..4e724717c 100644 --- a/website/blog/2020-03-21-2.0.0.md +++ b/website/blog/2020-03-21-2.0.0.md @@ -168,6 +168,8 @@ It may be also worth [checking the option docs](https://prettier.io/docs/en/opti This will help you avoid a mix of line endings in the repo and a broken `git blame`. If the old behavior is still preferred, please configure Prettier with `{ "endOfLine": "auto" }`. +If you use Travis CI, be aware of [the `autocrlf` option](https://docs.travis-ci.com/user/customizing-the-build#git-end-of-line-conversion-control) in `.travis.yml`. + #### Cache plugin search results ([#7485](https://github.com/prettier/prettier/pull/7485) by [@fisker](https://github.com/fisker)) Previously, Prettier searched the file system for plugins on every `prettier.format` call. Now, search results are cached. The cache can be cleared by calling `prettier.clearConfigCache()`. diff --git a/website/versioned_docs/version-stable/options.md b/website/versioned_docs/version-stable/options.md index 24384320f..6df1ff4b5 100644 --- a/website/versioned_docs/version-stable/options.md +++ b/website/versioned_docs/version-stable/options.md @@ -347,7 +347,7 @@ If you want to make sure that your entire git repository only contains Linux-sty 1. Ensure Prettier’s `endOfLine` option is set to `lf` (this is a default value since v2.0.0) 1. Configure [a pre-commit hook](precommit.md) that will run Prettier -1. Configure Prettier to run in your CI pipeline using [`--check` flag](cli.md#check) +1. Configure Prettier to run in your CI pipeline using [`--check` flag](cli.md#check). If you use Travis CI, set [the `autocrlf` option](https://docs.travis-ci.com/user/customizing-the-build#git-end-of-line-conversion-control) to `input` in `.travis.yml`. 1. Add `* text=auto eol=lf` to the repo's `.gitattributes` file. You may need to ask Windows users to re-clone your repo after this change to ensure git has not converted `LF` to `CRLF` on checkout.