Skip to content

Commit bfbd5fa

Browse files
committed
build: add .editorconfig for consistent code formatting
Adds a root .editorconfig with basic formatting conventions (UTF-8, LF line endings, trailing whitespace trimming, final newline, and indentation rules for Kotlin, Java, Gradle, XML, YAML/JSON, and Markdown) so contributors get consistent defaults across editors and IDEs. Fixes #964
1 parent 9af5ab7 commit bfbd5fa

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.editorconfig

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{kt,kts}]
12+
indent_size = 4
13+
max_line_length = 100
14+
ij_kotlin_allow_trailing_comma = true
15+
ij_kotlin_allow_trailing_comma_on_call_site = true
16+
ij_kotlin_packages_to_use_import_on_demand = unset
17+
18+
[*.java]
19+
indent_size = 4
20+
max_line_length = 100
21+
22+
[*.{xml,gradle}]
23+
indent_size = 4
24+
25+
[*.{yml,yaml,json}]
26+
indent_size = 2
27+
28+
[*.md]
29+
trim_trailing_whitespace = false
30+
31+
[*.{bat,cmd}]
32+
end_of_line = crlf
33+
34+
[Makefile]
35+
indent_style = tab

0 commit comments

Comments
 (0)