Skip to content

Commit

Permalink
Disable @typescript-eslint/no-unnecessary-condition rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 3, 2020
1 parent c4d411a commit f13cf8b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion index.js
Expand Up @@ -337,7 +337,16 @@ module.exports = {
'@typescript-eslint/no-throw-literal': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'no-constant-condition': 'off', // `no-unnecessary-condition` is essentially a stricter version of `no-constant-condition`.
'@typescript-eslint/no-unnecessary-condition': 'error',

// TODO: Try to enable this again in 2023 *if* the following are resolved:
// - https://github.com/microsoft/TypeScript/issues/13778 (otherwise, it will report on if checks for elements extracted from array)
// - https://github.com/microsoft/TypeScript/issues/36393
// - The rule needs a way to ignore runtime type-checks: https://github.com/sindresorhus/refined-github/pull/3168
// - Run the rule on https://github.com/sindresorhus/refined-github and ensure there are no false-positives
//
// Also related: https://github.com/typescript-eslint/typescript-eslint/issues/1798
// '@typescript-eslint/no-unnecessary-condition': 'error',

'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
Expand Down

0 comments on commit f13cf8b

Please sign in to comment.