From 65b885bb76be98026296eefe5f53174b84f83d8d Mon Sep 17 00:00:00 2001 From: "Nguyen, Duc" Date: Mon, 7 Oct 2019 23:46:28 +0700 Subject: [PATCH 1/2] Use editorconfig to prevent tab and space mixed --- .editorconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..d75a366cb --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +indent_size = 4 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 From 985706f6f5badcc0c37589ac79f3224100d1efff Mon Sep 17 00:00:00 2001 From: "Nguyen, Duc" Date: Fri, 11 Oct 2019 00:07:10 +0700 Subject: [PATCH 2/2] Use .editorconfig from https://raw.githubusercontent.com/WordPress/wordpress-develop/master/.editorconfig --- .editorconfig | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index d75a366cb..c6f3cf495 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,15 +1,24 @@ +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org + +# WordPress Coding Standards +# https://make.wordpress.org/core/handbook/coding-standards/ + root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true -indent_style = tab -indent_size = 4 trim_trailing_whitespace = true +indent_style = tab + +[*.yml] +indent_style = space +indent_size = 2 [*.md] trim_trailing_whitespace = false -[*.{yml,yaml}] -indent_size = 2 +[{*.txt,wp-config-sample.php}] +end_of_line = crlf