From 83f4fc8ab07a7f4cd3bba8042d600d7a4543bcaf Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 23 Oct 2022 23:53:15 +0800 Subject: It's been a long time not developing this. Still need some time to get it work again. --- FrontEnd/.eslintrc.cjs | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 FrontEnd/.eslintrc.cjs (limited to 'FrontEnd/.eslintrc.cjs') diff --git a/FrontEnd/.eslintrc.cjs b/FrontEnd/.eslintrc.cjs new file mode 100644 index 00000000..62490975 --- /dev/null +++ b/FrontEnd/.eslintrc.cjs @@ -0,0 +1,39 @@ +module.exports = { + root: true, + env: { + browser: true, + es2022: true, + }, + extends: [ + "eslint:recommended", + "plugin:react/recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/recommended-requiring-type-checking", + "plugin:prettier/recommended", + "plugin:react-hooks/recommended", + ], + parser: "@typescript-eslint/parser", + parserOptions: { + tsconfigRootDir: __dirname, + project: ["./tsconfig.json"], + }, + plugins: ["react", "@typescript-eslint", "react-hooks"], + settings: { + react: { + version: "detect", + }, + }, + rules: { + "react/prop-types": "off", + "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], + "@typescript-eslint/explicit-function-return-type": [ + "warn", + { + allowExpressions: true, + allowTypedFunctionExpressions: true, + allowHigherOrderFunctions: true, + }, + ], + }, +}; -- cgit v1.2.3