From 2d39399d36a4c28f55b2fb1b249b101563e4962a Mon Sep 17 00:00:00 2001 From: Avior Date: Thu, 8 Dec 2022 11:01:49 +0100 Subject: [PATCH] misc(config): Updated configs Signed-off-by: Avior --- packages/config/eslint/base.json | 14 ++++---------- packages/config/eslint/typescript.json | 13 ++++++++----- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/packages/config/eslint/base.json b/packages/config/eslint/base.json index 75615ca..1911a85 100644 --- a/packages/config/eslint/base.json +++ b/packages/config/eslint/base.json @@ -18,7 +18,6 @@ "error", "always" ], - "complexity": "off", "constructor-super": "error", "curly": "error", "dot-notation": "error", @@ -45,11 +44,7 @@ "warn", { "exceptions": [ - "_", - "a", - "b", - "c", - "p" + "_" ] } ], @@ -61,7 +56,6 @@ "SwitchCase": 1 } ], - "init-declration": "off", "linebreak-style": [ "error", "unix" @@ -115,7 +109,6 @@ "no-import-assign": "error", "no-inner-declarations": "error", "no-invalid-regexp": "error", - "no-invalid-this": "off", "no-irregular-whitespace": "error", "no-label-var": "error", "no-loss-of-precision": "error", @@ -126,7 +119,6 @@ "no-promise-executor-return": "error", "no-prototype-builtins": "error", "no-regex-spaces": "error", - "no-restricted-globals": "off", "no-setter-return": "error", "no-shadow": [ "error", @@ -191,6 +183,8 @@ ], "spaced-comment": "error", "use-isnan": "error", - "valid-typeof": "warn" + "valid-typeof": "warn", + "complexity": ["warn", 5], + "max-depth": ["warn", 2] } } diff --git a/packages/config/eslint/typescript.json b/packages/config/eslint/typescript.json index 2e33afb..d6ee071 100644 --- a/packages/config/eslint/typescript.json +++ b/packages/config/eslint/typescript.json @@ -39,7 +39,14 @@ "default": "generic" } ], - "@typescript-eslint/ban-types": "error", + "@typescript-eslint/ban-types": [ + "error", + { + "types": { + "{}": false + } + } + ], "@typescript-eslint/consistent-type-assertions": "error", "@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/explicit-member-accessibility": [ @@ -48,8 +55,6 @@ "accessibility": "explicit" } ], - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/interface-name-prefix": "off", "@typescript-eslint/member-delimiter-style": [ "error", { @@ -74,7 +79,6 @@ "ignoreJSX": "all" } ], - "@typescript-eslint/no-inferrable-types": "off", "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-namespace": "error", "@typescript-eslint/no-parameter-properties": "off", @@ -85,7 +89,6 @@ "allowTernary": true } ], - "@typescript-eslint/no-use-before-define": "off", "@typescript-eslint/prefer-for-of": "error", "@typescript-eslint/prefer-function-type": "error", "@typescript-eslint/prefer-namespace-keyword": "error",