docs: autocrlf option of Travis CI
This commit is contained in:
1 parent
c1dd17cf38
commit
b4a5225770
3 files changed
+4
-2
No files matched your search
+1
-1
@@ -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.
|
||||
|
||||
|
||||
@@ -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()`.
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in new issue
Block a user