]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Make Prettier preserve line ending type (#2244)
authorFelix Hildén <felix.hilden@gmail.com>
Mon, 17 May 2021 18:38:43 +0000 (21:38 +0300)
committerGitHub <noreply@github.com>
Mon, 17 May 2021 18:38:43 +0000 (14:38 -0400)
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

.pre-commit-config.yaml
.prettierrc.yaml [new file with mode: 0644]

index e461aa39c9d0f60962606e86ca73738fa82ede9c..2527c4d42abd243f7876e2878331f6aab2fc6d36 100644 (file)
@@ -28,4 +28,3 @@ repos:
     rev: v2.2.1
     hooks:
       - id: prettier
-        args: [--prose-wrap=always, --print-width=88]
diff --git a/.prettierrc.yaml b/.prettierrc.yaml
new file mode 100644 (file)
index 0000000..beda5ba
--- /dev/null
@@ -0,0 +1,3 @@
+proseWrap: always
+printWidth: 88
+endOfLine: auto