Skip to content

Instantly share code, notes, and snippets.

@PraneethKarnena
Last active April 13, 2024 16:22
Show Gist options
  • Save PraneethKarnena/da58997d260caa59aa41236dd93a51cd to your computer and use it in GitHub Desktop.
Save PraneethKarnena/da58997d260caa59aa41236dd93a51cd to your computer and use it in GitHub Desktop.
Sample .editorconfig file for Python
# https://editorconfig.org/
root = true
[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8
[*.py]
max_line_length = 88
ensure_newline_before_comments = true
include_trailing_comma = true
use_parentheses = true
# Use 2 spaces for the HTML files
[*.html]
indent_size = 2
# The JSON files contain newlines inconsistently
[*.json]
indent_size = 2
insert_final_newline = false
[**/admin/js/vendor/**]
indent_style = unset
indent_size = unset
# Minified JavaScript files shouldn't be changed
[**.min.js]
indent_style = unset
insert_final_newline = false
# Makefiles always use tabs for indentation
[Makefile]
indent_style = tab
# Batch files use tabs for indentation
[*.bat]
indent_style = tab
[docs/**.txt]
max_line_length = 88
[*.yml]
indent_size = 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment