From fb0390db889e0219c7f8306eca38620aab398545 Mon Sep 17 00:00:00 2001 From: Ned Twigg Date: Tue, 23 Jun 2020 10:32:33 -0700 Subject: [PATCH] Respect "parser" the same as we respect "filepath" --- .../java/com/diffplug/spotless/npm/PrettierFormatterStep.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/com/diffplug/spotless/npm/PrettierFormatterStep.java b/lib/src/main/java/com/diffplug/spotless/npm/PrettierFormatterStep.java index bfa4aa083b..72722a5a9a 100644 --- a/lib/src/main/java/com/diffplug/spotless/npm/PrettierFormatterStep.java +++ b/lib/src/main/java/com/diffplug/spotless/npm/PrettierFormatterStep.java @@ -129,7 +129,7 @@ public String apply(String input, File source) throws Exception { private String assertFilepathInConfigOptions(File file) { // if it is already in the options, we do nothing - if (prettierConfigOptions.contains("\"filepath\"")) { + if (prettierConfigOptions.contains("\"filepath\"") || prettierConfigOptions.contains("\"parser\"")) { return prettierConfigOptions; } // if the file has no name, we cannot use it