Skip to content
This repository was archived by the owner on Dec 30, 2025. It is now read-only.

Commit 64e2df4

Browse files
committed
chore(editorconfig): enhance .editorconfig with specific rules for various file types
Add detailed configuration for different file types to ensure consistent coding styles across the project. This includes settings for YAML, JSON, Python, JavaScript, CSS, HTML, Markdown, configuration files, Docker files, Makefiles, and SQL files. Each file type now has specific indentation styles, sizes, and maximum line lengths, which improves code readability and maintainability by enforcing a uniform style across the codebase.
1 parent 52ce555 commit 64e2df4

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

.editorconfig

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
root = true
22

3+
# Global settings for all files
34
[*]
45
charset = utf-8
56
end_of_line = lf
67
insert_final_newline = true
78
trim_trailing_whitespace = true
9+
max_line_length = 120
810

11+
# Shell scripts
912
[*.sh]
1013
# shfmt configuration via EditorConfig
1114
shell_variant = bash
@@ -15,3 +18,84 @@ binary_next_line = true
1518
switch_case_indent = true
1619
space_redirects = true
1720
keep_padding = true
21+
22+
# YAML files (Docker Compose, GitHub Actions, etc.)
23+
[*.{yml,yaml}]
24+
indent_style = space
25+
indent_size = 2
26+
insert_final_newline = true
27+
trim_trailing_whitespace = true
28+
29+
# JSON files (configuration, package.json, etc.)
30+
[*.json]
31+
indent_style = space
32+
indent_size = 2
33+
insert_final_newline = true
34+
trim_trailing_whitespace = true
35+
36+
# Python files
37+
[*.py]
38+
indent_style = space
39+
indent_size = 4
40+
insert_final_newline = true
41+
trim_trailing_whitespace = true
42+
max_line_length = 88
43+
44+
# JavaScript/TypeScript files
45+
[*.{js,ts,jsx,tsx}]
46+
indent_style = space
47+
indent_size = 2
48+
insert_final_newline = true
49+
trim_trailing_whitespace = true
50+
max_line_length = 100
51+
52+
# CSS/SCSS files
53+
[*.{css,scss,sass}]
54+
indent_style = space
55+
indent_size = 2
56+
insert_final_newline = true
57+
trim_trailing_whitespace = true
58+
59+
# HTML files
60+
[*.{html,htm}]
61+
indent_style = space
62+
indent_size = 2
63+
insert_final_newline = true
64+
trim_trailing_whitespace = true
65+
max_line_length = 120
66+
67+
# Markdown files
68+
[*.md]
69+
indent_style = space
70+
indent_size = 2
71+
insert_final_newline = true
72+
trim_trailing_whitespace = true
73+
max_line_length = 80
74+
75+
# Configuration files
76+
[*.{conf,cfg,ini}]
77+
indent_style = space
78+
indent_size = 2
79+
insert_final_newline = true
80+
trim_trailing_whitespace = true
81+
82+
# Docker files
83+
[{Dockerfile,Containerfile}*]
84+
indent_style = space
85+
indent_size = 4
86+
insert_final_newline = true
87+
trim_trailing_whitespace = true
88+
89+
# Makefile
90+
[Makefile]
91+
indent_style = tab
92+
insert_final_newline = true
93+
trim_trailing_whitespace = true
94+
95+
# SQL files
96+
[*.sql]
97+
indent_style = space
98+
indent_size = 2
99+
insert_final_newline = true
100+
trim_trailing_whitespace = true
101+
max_line_length = 100

0 commit comments

Comments
 (0)