From 1203dafb9164dde6bc68b4965efa2ab08f445afd Mon Sep 17 00:00:00 2001 From: sinkaroid Date: Fri, 3 Jun 2022 09:32:39 +0700 Subject: [PATCH] style: add eslint rule --- .eslintrc.json | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..bcf3255 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,41 @@ +{ + "env": { + "es2021": true, + "node": true, + "commonjs": true + }, + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 12, + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint" + ], + "rules": { + "linebreak-style": 0, + "quotes": [ + "error", + "double" + ], + "semi": [ + "error", + "always" + ], + "no-empty": "error", + "no-func-assign": "error", + "no-case-declarations": "off", + "no-unreachable": "error", + "no-eval": "error", + "no-global-assign": "error", + "@typescript-eslint/no-explicit-any": ["off"], + "indent": [ + "error", + 2 + ] + } +} \ No newline at end of file