From 427ea70099e249da49ee59ef117b063f17b6b5d9 Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Mon, 25 Nov 2019 21:32:14 +1100 Subject: [PATCH] fix: Fix incorrect `no-undef` errors when exporting default interfaces (#51) --- lib/shared.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/shared.js b/lib/shared.js index ba2de07..b8a6895 100644 --- a/lib/shared.js +++ b/lib/shared.js @@ -117,4 +117,15 @@ module.exports = { }, ], }, + overrides: [ + { + files: ['*.ts', '*.tsx'], + rules: { + // Disable `no-undef` rule within TypeScript files because it incorrectly errors when exporting default interfaces + // https://github.com/iamturns/eslint-config-airbnb-typescript/issues/50 + // This will be caught by TypeScript compiler if `strictNullChecks` (or `strict`) is enabled + 'no-undef': 'off', + }, + }, + ], };