Skip to content

Commit 4dc8556

Browse files
committed
feat: add support for additional file extensions (graphql, mdx, xml, json5)
1 parent 4450d24 commit 4dc8556

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

src/main.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,19 @@ class AcodePrettier {
104104
case "yml":
105105
return "yaml";
106106

107+
case "graphql":
108+
case "gql":
109+
return "graphql";
110+
111+
case "mdx":
112+
return "mdx";
113+
114+
case "xml":
115+
return "xml";
116+
117+
case "json5":
118+
return "json5";
119+
107120
default:
108121
return ext;
109122
}
@@ -141,11 +154,16 @@ class AcodePrettier {
141154
"tsx",
142155
"vue",
143156
"json",
157+
"json5",
144158
"hbs",
145159
"handlebars",
146160
"md",
161+
"mdx",
147162
"yaml",
148163
"yml",
164+
"graphql",
165+
"gql",
166+
"xml",
149167
];
150168

151169
acode.registerFormatter(pluginId, extensions, this.run);

0 commit comments

Comments
 (0)