Skip to content

Commit

Permalink
fix line-endings conflict between prettier and git
Browse files Browse the repository at this point in the history
The git attribute normalizes line endings for checkout and pushing depending on
the user's OS.
See https://git-scm.com/docs/gitattributes#_end_of_line_conversion

The prettier config does the same, so the working directory is not polluted when
running prettier.
  • Loading branch information
Vankog committed Nov 5, 2024
1 parent eb48ad7 commit 13b7826
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto

*.sh text eol=lf
*.bat text eol=crlf
1 change: 1 addition & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tabWidth: 4
printWidth: 100
trailingComma: "none"
endOfLine: "auto"

0 comments on commit 13b7826

Please sign in to comment.