From 7b27d78f285ca9ee50b955f8965a3b017cc0a440 Mon Sep 17 00:00:00 2001 From: Peach Date: Thu, 9 May 2024 09:49:01 +0800 Subject: [PATCH] fix: doctor import checkups is not work for jsx and tsx files (#754) * fix: doctor import checkups is not work for jsx/tsx files * test: add tsx case for imports checkup --- src/doctor/index.ts | 2 +- tests/fixtures/doctor/errors/src/component.tsx | 1 + tests/fixtures/doctor/errors/src/index.ts | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 tests/fixtures/doctor/errors/src/component.tsx diff --git a/src/doctor/index.ts b/src/doctor/index.ts index 5a36f286..4d6a6394 100644 --- a/src/doctor/index.ts +++ b/src/doctor/index.ts @@ -139,7 +139,7 @@ export default async (api: IApi): Promise => { for (const file of sourceFiles) { // skip non-javascript files // TODO: support collect imports from style style pre-processor files - if (!/(?