Skip to content

Commit fb0390d

Browse files
committed
Respect "parser" the same as we respect "filepath"
1 parent 41214ab commit fb0390d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/main/java/com/diffplug/spotless/npm/PrettierFormatterStep.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public String apply(String input, File source) throws Exception {
129129

130130
private String assertFilepathInConfigOptions(File file) {
131131
// if it is already in the options, we do nothing
132-
if (prettierConfigOptions.contains("\"filepath\"")) {
132+
if (prettierConfigOptions.contains("\"filepath\"") || prettierConfigOptions.contains("\"parser\"")) {
133133
return prettierConfigOptions;
134134
}
135135
// if the file has no name, we cannot use it

0 commit comments

Comments
 (0)