From 9b363ff33ffdb0ff54ee91c797f54ba7bda8c52b Mon Sep 17 00:00:00 2001 From: Max Davidson Date: Tue, 19 Nov 2019 22:01:18 +0100 Subject: [PATCH] Override no-unused-expressions with the typescript-eslint version Fixes issues with optional chaining --- packages/eslint-config-react-app/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index 419dc10e8d4..d00e80dd74c 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -92,6 +92,15 @@ module.exports = { typedefs: false, }, ], + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': [ + 'error', + { + allowShortCircuit: true, + allowTernary: true, + allowTaggedTemplates: true, + }, + ], 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': [ 'warn',