Browse Source

fix(lint): update configuration rules

pull/4203/head
KenTandrian 7 months ago
parent
commit
f76264259f
  1. 27
      eslint.config.cjs

27
eslint.config.cjs

@ -121,7 +121,6 @@ module.exports = [
'@typescript-eslint/unified-signatures': 'error', '@typescript-eslint/unified-signatures': 'error',
'@typescript-eslint/no-loss-of-precision': 'warn', '@typescript-eslint/no-loss-of-precision': 'warn',
'@typescript-eslint/no-var-requires': 'warn', '@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/ban-types': 'warn',
'arrow-body-style': 'off', 'arrow-body-style': 'off',
'constructor-super': 'error', 'constructor-super': 'error',
eqeqeq: ['error', 'smart'], eqeqeq: ['error', 'smart'],
@ -149,24 +148,48 @@ module.exports = [
'no-prototype-builtins': 'warn', 'no-prototype-builtins': 'warn',
'no-async-promise-executor': 'warn', 'no-async-promise-executor': 'warn',
'no-constant-condition': '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/await-thenable': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn', '@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/no-base-to-string': 'warn', '@typescript-eslint/no-base-to-string': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-floating-promises': 'warn', '@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-misused-promises': 'warn', '@typescript-eslint/no-misused-promises': 'warn',
'@typescript-eslint/no-redundant-type-constituents': 'warn', '@typescript-eslint/no-redundant-type-constituents': 'warn',
'@typescript-eslint/no-require-imports': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'warn', '@typescript-eslint/no-unnecessary-type-assertion': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn', '@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/no-unsafe-assignment': 'warn', '@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-enum-comparison': '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-member-access': 'warn',
'@typescript-eslint/no-unsafe-return': 'warn', '@typescript-eslint/no-unsafe-return': 'warn',
'@typescript-eslint/no-unsafe-call': '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/require-await': 'warn',
'@typescript-eslint/restrict-template-expressions': 'warn', '@typescript-eslint/restrict-template-expressions': 'warn',
'@typescript-eslint/unbound-method': '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'
} }
})) }))
]; ];

Loading…
Cancel
Save