Skip to content

Commit aa2051e

Browse files
committed
Add an .editorconfig file
This helps contributors get the basic formatting options in their IDEs automatically set right. (The setting for PHP files complies to the PSR-12 standard.) This change does not autoformat any files with these settings, though.
1 parent 50ecb4b commit aa2051e

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.editorconfig

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
# PHP files
12+
[*.php]
13+
indent_style = space
14+
indent_size = 4
15+
16+
# MD files
17+
[*.md]
18+
indent_style = space
19+
indent_size = 4
20+
21+
# XML files
22+
[*.xml]
23+
indent_style = space
24+
indent_size = 4
25+
26+
# YAML files
27+
[*.{yml,yaml}]
28+
indent_style = space
29+
indent_size = 2
30+
31+
# JSON files
32+
[*.json]
33+
indent_style = space
34+
indent_size = 4

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.editorconfig export-ignore
12
/.gitattributes export-ignore
23
/.github/ export-ignore
34
/.gitignore export-ignore

0 commit comments

Comments
 (0)