64 lines
1.9 KiB
INI
64 lines
1.9 KiB
INI
# https://editorconfig.org
|
||
root = true
|
||
|
||
# -------------------------------------------------
|
||
# Common settings – apply to every file
|
||
# -------------------------------------------------
|
||
[*]
|
||
charset = utf-8
|
||
end_of_line = lf
|
||
insert_final_newline = true
|
||
trim_trailing_whitespace = true
|
||
|
||
# -------------------------------------------------
|
||
# Python (*.py)
|
||
# -------------------------------------------------
|
||
[*.py]
|
||
indent_style = space
|
||
indent_size = 4
|
||
max_line_length = 88 # matches Black formatter default line length
|
||
# Optional: enforce a newline at the end of the file (already set globally)
|
||
|
||
# -------------------------------------------------
|
||
# JavaScript & TypeScript (*.js, *.jsx, *.ts, *.tsx)
|
||
# -------------------------------------------------
|
||
[*.{js,jsx,ts,tsx}]
|
||
indent_style = space
|
||
indent_size = 2
|
||
max_line_length = 120
|
||
trim_trailing_whitespace = true
|
||
|
||
# -------------------------------------------------
|
||
# JSON (*.json, *.jsonc)
|
||
# -------------------------------------------------
|
||
[*.json]
|
||
indent_style = space
|
||
indent_size = 2
|
||
max_line_length = off # JSON is often compact; do not enforce length
|
||
trim_trailing_whitespace = false # JSON parsers ignore trailing spaces
|
||
|
||
# -------------------------------------------------
|
||
# HTML (*.html, *.htm)
|
||
# -------------------------------------------------
|
||
[*.{html,htm}]
|
||
indent_style = space
|
||
indent_size = 2
|
||
max_line_length = 120
|
||
trim_trailing_whitespace = true
|
||
|
||
# -------------------------------------------------
|
||
# CSS & SCSS (*.css, *.scss)
|
||
# -------------------------------------------------
|
||
[*.{css,scss}]
|
||
indent_style = space
|
||
indent_size = 2
|
||
max_line_length = 120
|
||
trim_trailing_whitespace = true
|
||
|
||
# -------------------------------------------------
|
||
# Markdown (*.md, *.markdown)
|
||
# -------------------------------------------------
|
||
[*.{md,markdown}]
|
||
max_line_length = off # Markdown lines can be long for readability
|
||
trim_trailing_whitespace = false # Preserve intentional spaces (e.g., line breaks)
|