Rework editorconfig

* Most file types prefer 2-space indents, so now default
  to that and list the exceptions
* Add max_line_length=120 for .py files (Django convention)
* Bat files require CRLF
This commit is contained in:
medmunds
2019-02-08 12:05:57 -08:00
parent 8464d3a231
commit bd55d8c298
2 changed files with 35 additions and 34 deletions

View File

@@ -1,24 +1,25 @@
# http://editorconfig.org
# https://editorconfig.org
root = true
# Follow Django conventions for most files
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
# Use 2 spaces for js and text(-like) files
[*.{html,js,json,md,rst,txt,yml}]
indent_size = 2
[*.py]
indent_size = 4
max_line_length = 120
# Makefiles always use tabs for indentation
[Makefile]
[*.{ini,lock}]
indent_size = 4
[{Makefile,*.bat}]
indent_style = tab
indent_size = 4
# Batch files use tabs for indentation
[*.bat]
indent_style = tab
end_of_line = crlf