-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
85 lines (60 loc) · 2.14 KB
/
.editorconfig
File metadata and controls
85 lines (60 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# ============================================================
# .editorconfig (Keep files consistent across editors and IDEs)
# ============================================================
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .editorconfig.
# WHY: Establish a cross-editor baseline so diffs stay clean and formatting is consistent.
# ALT: Repository may omit .editorconfig ONLY if formatting is enforced equivalently by CI and formatter tooling.
# CUSTOM: Adjust indent_size defaults only if organizational standards change; keep stable across projects.
# NOTE: Sections are ordered by editorial importance, not strict alphabetical order.
# EditorConfig is documented at https://editorconfig.org
root = true
# === Global defaults (always apply) ===
[*]
# WHY: Normalize line endings and encoding across Windows, macOS, and Linux.
end_of_line = lf
charset = utf-8
# WHY: Newline at EOF avoids noisy diffs and tool warnings.
insert_final_newline = true
# WHY: Remove accidental whitespace noise in diffs.
trim_trailing_whitespace = true
# WHY: Default to 2 spaces for configs and markup; language-specific overrides follow.
indent_style = space
indent_size = 2
# === Build systems (special rules) ===
[Makefile]
# WHY: Makefiles require tabs.
indent_style = tab
[*.mk]
# WHY: Makefile includes require tabs.
indent_style = tab
# === Markup and documentation ===
[*.md]
# WHY: Keep Markdown clean; use explicit <br> for hard line breaks.
indent_size = 2
trim_trailing_whitespace = true
[*.{yml,yaml}]
# WHY: YAML convention is 2 spaces.
indent_size = 2
indent_style = space
# === Data and configuration ===
[*.{json,jsonc,jsonl,ndjson}]
# WHY: JSON tooling typically expects 2 spaces.
indent_size = 2
indent_style = space
[*.toml]
# WHY: TOML often follows 4-space indentation in many projects.
indent_size = 4
indent_style = space
# === Programming languages ===
[*.{py,pyi}]
# WHY: Python convention is 4 spaces.
indent_size = 4
indent_style = space
[*.ps1]
# WHY: PowerShell convention is 4 spaces.
indent_size = 4
indent_style = space
[*.{sh,bash}]
# WHY: Shell script convention is 2 spaces.
indent_size = 2
indent_style = space