summaryrefslogtreecommitdiff
path: root/.editorconfig
diff options
context:
space:
mode:
authorTrey Hunner <trey@treyhunner.com>2015-04-27 21:12:31 -0700
committerTim Graham <timograham@gmail.com>2015-06-27 16:36:26 -0400
commitec4f219ecb7a5e43d0353633fac4dac42d0ee492 (patch)
tree149080086a963899ec8ca36f7ad8e086f81ce521 /.editorconfig
parent1e63652e44f1c12c6e0fec6dacfae0c865b7cdbf (diff)
downloaddjango-ec4f219ecb7a5e43d0353633fac4dac42d0ee492.tar.gz
Fixed #22463 -- Added code style guide and JavaScript linting (EditorConfig and ESLint)
Diffstat (limited to '.editorconfig')
-rw-r--r--.editorconfig37
1 files changed, 37 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..30d6fcc1e3
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,37 @@
+# http://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
+
+# Use 2 spaces for the HTML files
+[*.html]
+indent_size = 2
+
+# The JSON files contain newlines inconsistently
+[*.json]
+indent_size = 2
+insert_final_newline = ignore
+
+[**/admin/js/vendor/**]
+indent_style = ignore
+indent_size = ignore
+
+# Minified JavaScript files shouldn't be changed
+[**.min.js]
+indent_style = ignore
+insert_final_newline = ignore
+
+# Makefiles always use tabs for indentation
+[Makefile]
+indent_style = tab
+
+# Batch files use tabs for indentation
+[*.bat]
+indent_style = tab