From f76264259f3fa80988b1f1d23ee7bfc941b3858a Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Fri, 17 Jan 2025 23:59:29 +0700 Subject: [PATCH] fix(lint): update configuration rules --- eslint.config.cjs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/eslint.config.cjs b/eslint.config.cjs index 23c5ccf82..e5741972a 100644 --- a/eslint.config.cjs +++ b/eslint.config.cjs @@ -121,7 +121,6 @@ module.exports = [ '@typescript-eslint/unified-signatures': 'error', '@typescript-eslint/no-loss-of-precision': 'warn', '@typescript-eslint/no-var-requires': 'warn', - '@typescript-eslint/ban-types': 'warn', 'arrow-body-style': 'off', 'constructor-super': 'error', eqeqeq: ['error', 'smart'], @@ -149,24 +148,48 @@ module.exports = [ 'no-prototype-builtins': 'warn', 'no-async-promise-executor': 'warn', 'no-constant-condition': 'warn', + + // The following rules are part of eslint:recommended + // and can be remove once solved + 'no-constant-binary-expression': 'warn', + 'no-loss-of-precision': 'warn', + + // The following rules are part of @typescript-eslint/recommended-type-checked + // and can be remove once solved '@typescript-eslint/await-thenable': 'warn', '@typescript-eslint/ban-ts-comment': 'warn', '@typescript-eslint/no-base-to-string': 'warn', + '@typescript-eslint/no-empty-object-type': 'warn', '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-floating-promises': 'warn', '@typescript-eslint/no-misused-promises': 'warn', '@typescript-eslint/no-redundant-type-constituents': 'warn', + '@typescript-eslint/no-require-imports': 'warn', '@typescript-eslint/no-unnecessary-type-assertion': 'warn', '@typescript-eslint/no-unsafe-argument': 'warn', '@typescript-eslint/no-unsafe-assignment': 'warn', '@typescript-eslint/no-unsafe-enum-comparison': 'warn', + '@typescript-eslint/no-unsafe-function-type': 'warn', '@typescript-eslint/no-unsafe-member-access': 'warn', '@typescript-eslint/no-unsafe-return': 'warn', '@typescript-eslint/no-unsafe-call': 'warn', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + caughtErrors: 'none' + } + ], + '@typescript-eslint/no-wrapper-object-types': 'warn', + '@typescript-eslint/only-throw-error': 'warn', + '@typescript-eslint/prefer-promise-reject-errors': 'warn', '@typescript-eslint/require-await': 'warn', '@typescript-eslint/restrict-template-expressions': 'warn', '@typescript-eslint/unbound-method': 'warn', - '@typescript-eslint/prefer-nullish-coalescing': 'warn' + + // The following rules are part of @typescript-eslint/stylistic-type-checked + // and can be remove once solved + '@typescript-eslint/prefer-nullish-coalescing': 'warn', // TODO: Requires strictNullChecks: true + '@typescript-eslint/prefer-regexp-exec': 'warn' } })) ];