From 002f02533dbc322807e937d557c0673c06c8a727 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 6 Mar 2023 08:48:52 +0800 Subject: [PATCH] chore: update code style config --- .browserslistrc | 5 +++++ .editorconfig | 7 +++++-- .prettierrc | 3 +++ .stylelintrc.json | 7 ++++++- 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .browserslistrc create mode 100644 .prettierrc diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..afe4650 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,5 @@ +# https://github.com/browserslist/browserslist#browserslistrc + +last 2 versions +> 0.2% +not dead diff --git a/.editorconfig b/.editorconfig index f27e9a9..2b740bf 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,8 +9,11 @@ trim_trailing_whitespace = true end_of_line = lf insert_final_newline = true -[*.js] -indent_size = 4 +[*.{js,css,scss}] +quote_type = single + +[*.{yml,yaml}] +quote_type = double [*.md] trim_trailing_whitespace = false diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..36b3563 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "trailingComma": "none" +} diff --git a/.stylelintrc.json b/.stylelintrc.json index 66c0ffb..09b3c87 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -11,6 +11,11 @@ "alpha-value-notation": "number", "selector-not-notation": "simple", "color-hex-length": "long", - "declaration-block-single-line-max-declarations": 3 + "declaration-block-single-line-max-declarations": 3, + "scss/operator-no-newline-after": null, + "rule-empty-line-before": [ + "always", + { "ignore": ["after-comment", "first-nested", "inside-block"] } + ] } }