fix(linter): import from .tsx file lint fix now works correctly (#16995)

This commit is contained in:
Isaac Mann 2023-05-13 15:53:44 -04:00 committed by GitHub
parent b20e906f00
commit 881067bbd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -365,7 +365,8 @@ export default createESLintRule<Options, MessageIds>({
importsToRemap.push({
member: importMember,
importPath: importPathResolved.replace('.ts', ''),
// remove .ts or .tsx from the end of the file path
importPath: importPathResolved.replace(/.tsx?$/, ''),
});
}
}