From 2f0ecddfc801cd0172a4dad0060220750017b899 Mon Sep 17 00:00:00 2001 From: Julian Schacher Date: Sun, 16 May 2021 20:05:58 +0200 Subject: [PATCH] Other: Add `.editorconfig`s Add `.editorconfig`s, to help maintain a consistent coding style. Also apply the new style to existing files. --- .editorconfig | 15 +++++++++++++++ docs/.editorconfig | 6 ++++++ src/extension.js | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .editorconfig create mode 100644 docs/.editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..2ec8a01 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +charset = utf-8 + +[*.{js,json}] +indent_size = 4 +trim_trailing_whitespace = true + +[*.md] +indent_size = 4 +trim_trailing_whitespace = false diff --git a/docs/.editorconfig b/docs/.editorconfig new file mode 100644 index 0000000..52d3f50 --- /dev/null +++ b/docs/.editorconfig @@ -0,0 +1,6 @@ +# Unset rules for `.js` files in this directory, since they might come from +# external sources and therefore shouldn't be affected by this repos +# `.editorconfig`. +[*.js] +indent_size = unset +trim_trailing_whitespace = unset diff --git a/src/extension.js b/src/extension.js index 4d37617..3067cf0 100644 --- a/src/extension.js +++ b/src/extension.js @@ -89,7 +89,7 @@ class Extension { const validLeftBoxOrder = this._createValidBoxOrder("left"); const validCenterBoxOrder = this._createValidBoxOrder("center"); const validRightBoxOrder = this._createValidBoxOrder("right"); - + // Go through the items (or rather their roles) of a box and order the // box accordingly. const orderBox = (boxOrder, box) => {