-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
154 lines (130 loc) · 9.18 KB
/
Copy path.editorconfig
File metadata and controls
154 lines (130 loc) · 9.18 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs.
# https://editorconfig.org
root = true
# ─────────────────────────────────────────────────────────────
# Universal defaults
# ─────────────────────────────────────────────────────────────
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100
# ─────────────────────────────────────────────────────────────
# JavaScript / TypeScript / CSS / JSON
# 2-space indent, LF, single quotes.
# ─────────────────────────────────────────────────────────────
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}]
indent_size = 2
quote_type = single
[*.{css,scss,sass,less,html,htm,vue,svelte,astro}]
indent_size = 2
[*.{json,jsonc,json5}]
indent_size = 2
quote_type = double
# ─────────────────────────────────────────────────────────────
# Python
# PEP 8: 4-space indent, 79-char lines (Ruff default is 88).
# ─────────────────────────────────────────────────────────────
[*.{py,pyi}]
indent_size = 4
max_line_length = 88
# ─────────────────────────────────────────────────────────────
# Rust
# rustfmt: 4-space indent, 100-char lines (matches our rustfmt.toml).
# ─────────────────────────────────────────────────────────────
[*.rs]
indent_size = 4
max_line_length = 100
# ─────────────────────────────────────────────────────────────
# Swift
# Xcode default: 4-space indent. Matches our .swift-format lineLength=100.
# ─────────────────────────────────────────────────────────────
[*.swift]
indent_size = 4
max_line_length = 100
# ─────────────────────────────────────────────────────────────
# Objective-C / Logos (Theos tweaks)
# ─────────────────────────────────────────────────────────────
[*.{m,mm,h,x,xm,xi}]
indent_size = 4
max_line_length = 100
# ─────────────────────────────────────────────────────────────
# Go — tabs (gofmt requirement).
# ─────────────────────────────────────────────────────────────
[*.go]
indent_style = tab
indent_size = 4
# ─────────────────────────────────────────────────────────────
# C / C++ / CUDA — 4-space indent typical for kernel code.
# ─────────────────────────────────────────────────────────────
[*.{c,cc,cpp,cxx,h,hh,hpp,hxx,cu,cuh}]
indent_size = 4
max_line_length = 100
# ─────────────────────────────────────────────────────────────
# Makefile — tabs are LOAD-BEARING; make will not run without them.
# ─────────────────────────────────────────────────────────────
[{Makefile,makefile,GNUmakefile,*.mk}]
indent_style = tab
indent_size = 4
# ─────────────────────────────────────────────────────────────
# Shell scripts — 2 spaces (Google shell style guide).
# ─────────────────────────────────────────────────────────────
[*.{sh,bash,zsh,fish}]
indent_size = 2
max_line_length = 100
# ─────────────────────────────────────────────────────────────
# Config: YAML, TOML, INI — 2 spaces.
# YAML forbids tabs at spec level.
# ─────────────────────────────────────────────────────────────
[*.{yml,yaml}]
indent_size = 2
[*.{toml,ini,cfg,conf,properties}]
indent_size = 2
# ─────────────────────────────────────────────────────────────
# Prisma schema — 2 spaces (matches Prisma's official formatter).
# ─────────────────────────────────────────────────────────────
[*.prisma]
indent_size = 2
# ─────────────────────────────────────────────────────────────
# Markdown / MDX
# Trailing whitespace is significant (two trailing spaces = <br>).
# Disable trimming and don't wrap.
# ─────────────────────────────────────────────────────────────
[*.{md,mdx,markdown}]
trim_trailing_whitespace = false
max_line_length = off
# ─────────────────────────────────────────────────────────────
# Dockerfile — 2 spaces for continuation lines.
# ─────────────────────────────────────────────────────────────
[{Dockerfile,Dockerfile.*,*.dockerfile,Containerfile}]
indent_size = 2
# ─────────────────────────────────────────────────────────────
# XML / HTML fragments and plist (iOS control files)
# ─────────────────────────────────────────────────────────────
[*.{xml,plist,storyboard,xib,strings,svg}]
indent_size = 4
# ─────────────────────────────────────────────────────────────
# GraphQL, SQL, Terraform, Helm
# ─────────────────────────────────────────────────────────────
[*.{graphql,gql}]
indent_size = 2
[*.sql]
indent_size = 2
max_line_length = 120
[*.{tf,tfvars}]
indent_size = 2
# ─────────────────────────────────────────────────────────────
# Lockfiles: format is generator-controlled, never hand-edit.
# ─────────────────────────────────────────────────────────────
[{package-lock.json,pnpm-lock.yaml,yarn.lock,bun.lock,bun.lockb,uv.lock,poetry.lock,Cargo.lock,Package.resolved,composer.lock}]
insert_final_newline = false
trim_trailing_whitespace = false
# ─────────────────────────────────────────────────────────────
# Git-generated files
# ─────────────────────────────────────────────────────────────
[.gitmodules]
indent_style = tab