update(formatting): made consistent

Aligned `.prettierrc` and `.editorconfig` files to same, best-practice & most-widely-adopted standards.
This commit is contained in:
Kyle Affolder
2025-02-08 13:39:41 -05:00
parent 798af326a2
commit 089ee9bc07
2 changed files with 78 additions and 14 deletions
+9 -7
View File
@@ -1,7 +1,7 @@
# EditorConfig helps maintain consistent coding styles between editors
root = true
# Default settings for all files
# Default settings for all files (e.g. most common, best-practice standard across all filetypes)
[*]
charset = utf-8
end_of_line = lf
@@ -17,29 +17,31 @@ indent_size = 2
trim_trailing_whitespace = false
# JavaScript and TypeScript
[*.{js,ts}]
[*.{js,ts,tsx,cjs,mjs}]
indent_style = space
indent_size = 2
# JSON files (package.json, config files, etc.)
[*.json]
# JSON files (package.json, config files, etc.) - per JSON (RFC 8259) specification
[*.json,.prettierrc]
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = false
# YAML files (e.g., GitHub Actions, Lint configs)
[*.yaml]
# YAML files (e.g., GitHub Actions, Lint configs) - per YAML 1.2 (2009) specification
[*.{yaml,yml}]
indent_style = space
indent_size = 2
# Markdown files
[*.md]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false
# Dockerfile
[Dockerfile*]
indent_style = space
indent_style = tab
indent_size = 4
insert_final_newline = false
+69 -7
View File
@@ -1,9 +1,71 @@
{
"useTabs": true,
"semi": true,
"tabWidth": 4,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
"useTabs": false,
"semi": true,
"tabWidth": 2,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte",
"useTabs": false,
"semi": false,
"tabWidth": 2,
"trailingComma": "none",
"printWidth": 100
}
},
{
"files": ["*.js", "*.ts", "*.tsx", "*.cjs", "*.mjs"],
"options": {
"useTabs": false,
"semi": true,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 80
}
},
{
"files": ["*.json", ".prettierrc"],
"options": {
"useTabs": false,
"semi": false,
"tabWidth": 2,
"trailingComma": "none",
"printWidth": 100
}
},
{
"files": ["*.yaml", "*.yml"],
"options": {
"useTabs": false,
"semi": false,
"tabWidth": 2,
"trailingComma": "none",
"printWidth": 80
}
},
{
"files": "*.md",
"options": {
"useTabs": false,
"semi": false,
"tabWidth": 4,
"trailingComma": "none",
"printWidth": 100
}
},
{
"files": "Dockerfile",
"options": {
"useTabs": true,
"tabWidth": 4,
"semi": false,
"trailingComma": "none",
"printWidth": 120
}
}
]
}