From 24fd5499775918b8045948d7bea61e471fe9b040 Mon Sep 17 00:00:00 2001 From: Scott Newcomer Date: Fri, 30 Dec 2022 08:37:15 -0600 Subject: [PATCH] add comment about ts check --- src/rules/no-duplicates.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rules/no-duplicates.js b/src/rules/no-duplicates.js index 33e68b1d37..b896f442ae 100644 --- a/src/rules/no-duplicates.js +++ b/src/rules/no-duplicates.js @@ -113,6 +113,7 @@ function getFix(first, rest, sourceCode, context) { const isTypeSpecifier = specifier.importNode.importKind === 'type'; const preferInline = context.options[0] && context.options[0]['prefer-inline']; + // a user might set prefer-inline but not have a supporting TypeScript version. Flow does not support inline types so this should fail in that case as well. if (preferInline && !semver.satisfies(typescriptPkg.version, '>= 4.5')) { throw new Error('Your version of TypeScript does not support inline type imports.'); }