-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
73 lines (60 loc) · 2.45 KB
/
Copy path.editorconfig
File metadata and controls
73 lines (60 loc) · 2.45 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
# ======================================================================
# EditorConfig
# ======================================================================
# Purpose: Shared EditorConfig to enforce consistent formatting across
# editors
# Docs: https://editorconfig.org/
# ======================================================================
# Usage:
# - Ensure your editor supports EditorConfig (most IDEs support it
# by default)
# - Rules are applied top-to-bottom; more specific file globs override
# earlier rules
# - Update this file to change team-wide defaults; prefer small,
# focused sections
# ======================================================================
# Stop searching for other .editorconfig files in parent directories
root = true
# ----------------------------------------------------------------------
# Global Settings (Applied to all files)
# ----------------------------------------------------------------------
[*]
# Ensure cross-platform compatibility with standard UTF-8 encoding
charset = utf-8
# Use Unix-style line feeds (\n) to prevent "mismatched line ending"
# Git warnings
end_of_line = lf
# Project standard: Spaces are the industry standard for consistency
indent_style = space
# Default indent size (Will be overridden by specific languages below)
indent_size = 2
# Clean up: remove invisible spaces at the end of lines on save
trim_trailing_whitespace = true
# Standards: Ensure files end with a blank line for POSIX compatibility
insert_final_newline = true
# ----------------------------------------------------------------------
# Language Specific Overrides
# ----------------------------------------------------------------------
# Applies language-specific EditorConfig rules that override the global
# settings for targeted file types.
# ----------------------------------------------------------------------
# ---- Stylesheet languages ----
# Standard: 2 spaces for CSS/SASS to avoid deep nesting indentation
[*.{css,scss,sass}]
indent_size = 2
# ---- Scripting languages ----
# Standard: 2 spaces for JS/TS and related files
[*.{js,ts,mjs,cjs,jsx,tsx}]
indent_size = 2
# ---- Shell scripts ----
# Standard: 2 spaces for Bash scripts
[*.{sh,bash}]
indent_size = 2
# ---- Data & documentation ----
# Standard: 2 spaces for JSON/YAML/Markdown files
[*.{md,mdx,json,jsonc,yml,yaml}]
indent_size = 2
# ---- Backend languages ----
# Standard: 4 spaces for Python/PHP (PEP8 / PSR-12)
[*.{py,php}]
indent_size = 4