From f015d2e3c57d84233f5badd9992f03eb3671b5f6 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 25 Jun 2024 09:22:13 -0400 Subject: [PATCH] Always throw error when preprocessor fails Otherwise the parser in prettier fails downstream, and we lose the actual cause --- src/preprocessors/vue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preprocessors/vue.ts b/src/preprocessors/vue.ts index 42c80c9..7801b20 100644 --- a/src/preprocessors/vue.ts +++ b/src/preprocessors/vue.ts @@ -54,8 +54,8 @@ export function vuePreprocessor(code: string, options: PrettierOptions) { console.warn( '[@ianvs/prettier-plugin-sort-imports]: Could not process .vue file. Please be sure that "@vue/compiler-sfc" is installed in your project.', ); - throw err; } + throw err; } }