Skip to content

Commit 7beeec3

Browse files
Add EditorConfig file for consistent coding styles
1 parent f053e54 commit 7beeec3

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.editorconfig

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# EditorConfig is awesome: https://editorconfig.org
2+
# This file helps editors keep style consistent with PSR-12
3+
4+
root = true
5+
6+
# Base defaults for all files
7+
[*]
8+
end_of_line = lf
9+
charset = utf-8
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
# PHP files — PSR-12
14+
[*.php]
15+
indent_style = space
16+
indent_size = 4
17+
# Keep tab width consistent for editors that display tabs
18+
tab_width = 4
19+
max_line_length = 120
20+
21+
# JSON and YAML (commonly 2 spaces)
22+
[*.{json,yml,yaml}]
23+
indent_style = space
24+
indent_size = 2
25+
26+
# Markdown — keep trailing spaces (used for hard line breaks)
27+
[*.md]
28+
trim_trailing_whitespace = false
29+
30+
# Makefiles use hard tabs by convention
31+
[Makefile]
32+
indent_style = tab

0 commit comments

Comments
 (0)