From a807c4bc133177dee29b76e2a684fd0ce0cc1d56 Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Thu, 9 Nov 2023 03:26:13 +0800 Subject: [PATCH] Add editor formatting config --- .editorconfig | 8 ++++++++ .eslintrc.json | 16 ++++++++++++++++ .prettierrc.json | 6 ++++++ 3 files changed, 30 insertions(+) create mode 100644 .editorconfig create mode 100644 .eslintrc.json create mode 100644 .prettierrc.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..78c6dde --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 2 diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..d0f5814 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,16 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "env": { + "node": true + }, + "plugins": [ + "@typescript-eslint" + ], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended" + ] +} diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..d3cde14 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "trailingComma": "es5", + "semi": true, + "singleQuote": true, + "tabWidth": 2 +}