From 3f215dc51cfe8415635da054f639a1f6b539462f Mon Sep 17 00:00:00 2001 From: Eric Crosson Date: Sun, 17 Oct 2021 15:11:52 -0500 Subject: [PATCH] feat: enable no-non-null-asserted-nullish-coalescing Closes #22 --- index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index d0454be..af2755e 100644 --- a/index.js +++ b/index.js @@ -26,13 +26,6 @@ module.exports = { } ], '@typescript-eslint/strict-boolean-expressions': 'error', - '@typescript-eslint/prefer-nullish-coalescing': [ - 'error', - { - ignoreConditionalTests: false, - ignoreMixedLogicalExpressions: false - } - ], '@typescript-eslint/member-delimiter-style': [ 'error', { @@ -55,6 +48,16 @@ module.exports = { '@typescript-eslint/no-unnecessary-type-assertion': 'error', '@typescript-eslint/require-array-sort-compare': 'error', + // nullish coalescing + '@typescript-eslint/prefer-nullish-coalescing': [ + 'error', + { + ignoreConditionalTests: false, + ignoreMixedLogicalExpressions: false + } + ], + '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', + // A+ Promise rules '@typescript-eslint/promise-function-async': 'error', 'prefer-promise-reject-errors': 'error',