From a79ea05d2dac44f8cf65e7b0f53308c8def995d7 Mon Sep 17 00:00:00 2001 From: Akshay Birajdar Date: Sat, 17 Oct 2020 22:00:00 +0530 Subject: [PATCH 1/3] Introduce editorconfig --- .editorconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..7203adb09 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs +# @see http://editorconfig.org +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = spaces +tab_width = 2 + +[{*.{rb,erb,js,coffee,json,yml,css,scss,sh,markdown,md,html}] +indent_size = 2 From 3cd76e7666091c5b1ce9c49208c67e24bd4220a4 Mon Sep 17 00:00:00 2001 From: Akshay Birajdar Date: Mon, 19 Oct 2020 22:34:38 +0530 Subject: [PATCH 2/3] Sets indent size as 2 globally --- .editorconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 7203adb09..6a0dd95d2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,6 +9,4 @@ trim_trailing_whitespace = true insert_final_newline = true indent_style = spaces tab_width = 2 - -[{*.{rb,erb,js,coffee,json,yml,css,scss,sh,markdown,md,html}] indent_size = 2 From ce63a4d7bafe0b7fef1e2dc24f328a86953711d7 Mon Sep 17 00:00:00 2001 From: Akshay Birajdar Date: Mon, 19 Oct 2020 22:35:06 +0530 Subject: [PATCH 3/3] Adds Editor config action for linting --- .github/workflows/lint.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1818b5918..1a7a6fb6e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: Rubocop Linter +name: Linter on: [pull_request] @@ -19,3 +19,5 @@ jobs: gem install bundler dotenv bundle install --jobs 4 --retry 3 bundle exec rubocop + - name: Enforce EditorConfig + uses: zbeekman/EditorConfig-Action@28b76e718c351dd35b22c8f7216192bb9de5c21b