Skip to content

Commit 741149f

Browse files
committed
feat: add Prettier configuration for consistent code formatting
- Add .prettierignore with comprehensive exclusion patterns - Add .prettierrc.yml with project-specific formatting rules - Configure YAML-specific overrides for workflow files
1 parent fe48a7c commit 741149f

2 files changed

Lines changed: 113 additions & 0 deletions

File tree

.github/.prettierignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Directories managed by package managers or VCS
2+
node_modules/
3+
vendor/
4+
.git/
5+
6+
# Build outputs
7+
dist/
8+
build/
9+
10+
# Coverage artifacts
11+
coverage/
12+
*.cover
13+
*.cov
14+
coverage.txt
15+
coverage.html
16+
17+
# Minified assets
18+
*.min.js
19+
*.min.css
20+
21+
# Generated source code
22+
*.generated.*
23+
**gen.go
24+
mock**.go
25+
*.pb.go
26+
*.pb.gw.go
27+
**/packaged.yaml
28+
29+
# Compiled binaries
30+
*.exe
31+
*.dll
32+
*.so
33+
*.dylib
34+
*.test
35+
*.out
36+
37+
# Temporary / swap files
38+
*.tmp
39+
*.temp
40+
*.swp
41+
*.swo
42+
*~
43+
44+
# IDE metadata
45+
.idea/
46+
.vscode/
47+
*.iml
48+
49+
# Dependency locks
50+
go.sum
51+
package-lock.json
52+
yarn.lock
53+
54+
# Data exports
55+
*.json
56+
*.csv
57+
*.tsv
58+
*.sql
59+
60+
# Documentation & licenses
61+
*.md
62+
LICENSE
63+
CHANGELOG
64+
CITATION.cff
65+
66+
# Build & lint configs
67+
**/.golangci.json
68+
**/.golangci.yml
69+
**/.golangci.yaml
70+
**/.env.shared
71+
**/Makefile
72+
**/makefile
73+
**/*.mk

.github/.prettierrc.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# ------------------------------------------------------------------------------------
2+
# Prettier Configuration
3+
#
4+
# Purpose: Ensures consistent YAML formatting across all tools (Prettier, IDEs)
5+
# Location: .github directory (preferred for project-specific configs)
6+
#
7+
# Maintainer: @mrz1836
8+
#
9+
# ------------------------------------------------------------------------------------
10+
11+
# Print width (line length limit)
12+
printWidth: 80
13+
14+
# Indentation
15+
tabWidth: 2
16+
useTabs: false
17+
18+
# Quotes
19+
singleQuote: false # Use double quotes for consistency
20+
21+
# Brackets and spacing (applies to JS/JSON objects, not YAML arrays)
22+
bracketSpacing: false # Keep consistent with YAML array formatting
23+
bracketSameLine: false
24+
25+
# Array and object formatting
26+
trailingComma: "none" # No trailing commas in YAML
27+
28+
# Line endings (should match .editorconfig)
29+
endOfLine: "lf"
30+
31+
# Prose formatting (for Markdown in YAML)
32+
proseWrap: "preserve"
33+
34+
# YAML-specific settings
35+
overrides:
36+
- files: "*.{yml,yaml}"
37+
options:
38+
printWidth: 120 # Allow longer lines for YAML workflow files
39+
bracketSpacing: false
40+
singleQuote: false

0 commit comments

Comments
 (0)