Skip to content

Commit 921c24a

Browse files
authored
Make Prettier preserve line ending type (psf#2244)
Why? The default in Prettier 2.0 was [changed](https://prettier.io/docs/en/options.html#end-of-line) from `auto` to `LF`. This makes development on Windows awkward, because every file is marked with changes both by Prettier and then by Git regardless of repository line ending settings, making committing harder than it should be. --- Aside from that: I noticed that runnin pre-commit manually seems to add line endings to symlink files, but they disappear when actually committing. Don't know if that's a known.. quirk..(?) or not. --- Commit history before merge: * Make Prettier preserve line ending type * Move options to .prettierrc
1 parent b8450b9 commit 921c24a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.pre-commit-config.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ repos:
2828
rev: v2.2.1
2929
hooks:
3030
- id: prettier
31-
args: [--prose-wrap=always, --print-width=88]

.prettierrc.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
proseWrap: always
2+
printWidth: 88
3+
endOfLine: auto

0 commit comments

Comments
 (0)