From 2f0044ed1b8eaacc5bd687dc8d8dbd153c2f8e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A2=96=E9=80=B8?= <49649786+Zuoqiu-Yingyi@users.noreply.github.com> Date: Tue, 30 Jul 2024 19:03:21 +0800 Subject: [PATCH] chore: add `EditorConfig` configuration file `.editorconfig` --- .editorconfig | 22 ++++++++++++++++++++++ .husky/commit-msg | 4 +++- .husky/pre-commit | 4 +++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000000..9397c04a1ad15 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,22 @@ +# REF: https://spec.editorconfig.org/#supported-pairs + +root = true + +[*] +indent_style = space +indent_size = 4 +# tab_width = 4 +# end_of_line = lf +charset = utf-8 +# spelling_language = en-US +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{md}] +trim_trailing_whitespace = false + +[*.{go}] +indent_style = tab + +[*.{yml,yaml}] +indent_size = 2 diff --git a/.husky/commit-msg b/.husky/commit-msg index 34eed8b2868da..823cbaa47f802 100644 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1 +1,3 @@ -npx --no -- commitlint --edit $1 \ No newline at end of file +#!/bin/sh + +npx --no -- commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit index f031a09bd4421..b915ae7603b09 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1,3 @@ -npx lint-staged --allow-empty $1 \ No newline at end of file +#!/bin/sh + +npx lint-staged --allow-empty $1