Unverified Commit 921c24af authored by Felix Hildén's avatar Felix Hildén Committed by GitHub
Browse files

Make Prettier preserve line ending type (#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
parent b8450b9f
Loading
Loading
Loading
Loading
+0 −1
Changes for .pre-commit-config.yaml: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -28,4 +28,3 @@ repos:
    rev: v2.2.1
    hooks:
      - id: prettier
        args: [--prose-wrap=always, --print-width=88]

.prettierrc.yaml

0 → 100644
+3 −0
Changes for .prettierrc.yaml: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
proseWrap: always
printWidth: 88
endOfLine: auto