在 VS Code 中使用 Prettier 格式化 .ejs 文件

2024-05-23

我想使用 prettier 通过添加自定义规则来格式化我的 ejs 文件。

现在我正在使用 html 的文件关联作为 ejs 文件。

我在 settings.json 文件中添加了以下代码: “文件.关联”:{ “*.ejs”:“html” },


不幸的是 Prettier 目前不支持 EJS。支持的语言列表在其文档中列出https://prettier.io/docs/en/index.html https://prettier.io/docs/en/index.html

但是,他们确实支持插件,因此有人可以添加支持https://prettier.io/docs/en/plugins.html https://prettier.io/docs/en/plugins.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 VS Code 中使用 Prettier 格式化 .ejs 文件 的相关文章

随机推荐