Browse Source

refac: update .gitattributes and .prettierrc for consistent line endings

Dave 3 weeks ago
parent
commit
059327cd19
2 changed files with 51 additions and 2 deletions
  1. 49 1
      .gitattributes
  2. 2 1
      .prettierrc

+ 49 - 1
.gitattributes

@@ -1 +1,49 @@
-*.sh text eol=lf
+# TypeScript
+*.ts     text eol=lf
+*.tsx    text eol=lf
+
+# JavaScript
+*.js     text eol=lf
+*.jsx    text eol=lf
+*.mjs    text eol=lf
+*.cjs    text eol=lf
+
+# Svelte
+*.svelte text eol=lf
+
+# HTML/CSS
+*.html   text eol=lf
+*.css    text eol=lf
+*.scss   text eol=lf
+*.less   text eol=lf
+
+# Config files and JSON
+*.json   text eol=lf
+*.jsonc  text eol=lf
+*.yml    text eol=lf
+*.yaml   text eol=lf
+*.toml   text eol=lf
+
+# Shell scripts
+*.sh     text eol=lf
+
+# Markdown & docs
+*.md     text eol=lf
+*.mdx    text eol=lf
+*.txt    text eol=lf
+
+# Git-related
+.gitattributes text eol=lf
+.gitignore     text eol=lf
+
+# Prettier and other dotfiles
+.prettierrc     text eol=lf
+.prettierignore text eol=lf
+.eslintrc       text eol=lf
+.eslintignore   text eol=lf
+.stylelintrc    text eol=lf
+.editorconfig   text eol=lf
+
+# Misc
+*.env     text eol=lf
+*.lock    text eol=lf

+ 2 - 1
.prettierrc

@@ -5,5 +5,6 @@
 	"printWidth": 100,
 	"plugins": ["prettier-plugin-svelte"],
 	"pluginSearchDirs": ["."],
-	"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
+	"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }],
+	"endOfLine": "lf"
 }