From d0a91acd04f5df663d033874bfba96dae21ac2f2 Mon Sep 17 00:00:00 2001 From: sinkaroid Date: Tue, 18 Apr 2023 11:09:43 +0700 Subject: [PATCH] style: add eslint and eslintignore target --- .eslintignore | 2 ++ .eslintrc.json | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .eslintignore create mode 100644 .eslintrc.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..b51ea71 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +node_modules/ +build/ \ No newline at end of file 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