From 668282fe18048d123bf7d5c1cdb5dabc3a9229a7 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Wed, 12 Jun 2019 08:49:54 -0700 Subject: [PATCH] fix: Add proper parser loading for vue --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index fe2c508..a80912d 100644 --- a/src/index.js +++ b/src/index.js @@ -126,7 +126,8 @@ function format(options) { } if ([".vue"].includes(fileExtension)) { - formattingOptions.eslint.parser = require.resolve("vue-eslint-parser"); + formattingOptions.eslint.parser = + formattingOptions.eslint.parser || require.resolve("vue-eslint-parser"); } const eslintFix = createEslintFix(formattingOptions.eslint, eslintPath);