Skip to content

Commit

Permalink
add comment about ts check
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Dec 30, 2022
1 parent f495fd9 commit 24fd549
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rules/no-duplicates.js
Expand Up @@ -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.');
}
Expand Down

0 comments on commit 24fd549

Please sign in to comment.