百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

markup_fmt

> 前端框架
开源

配置可用的 HTML、Vue、Svelte、Astro、Angular、Jinja、Twig、Nunjucks、Vento、Mustache、Handlebars 和 XML 格式化器,并集成 dprint。

179 stars0 点赞5 次浏览
访问官网GitHub

工具介绍

配置可用的 HTML、Vue、Svelte、Astro、Angular、Jinja、Twig、Nunjucks、Vento、Mustache、Handlebars 和 XML 格式化器,并集成 dprint。

markup_fmt

markup_fmt is a configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, Vento, Mustache, Handlebars and XML formatter.

Notes for Vue and Svelte Users

This formatter provides some options such as vBindStyle, vOnStyle and more for Vue and svelteAttrShorthand and svelteDirectiveShorthand for Svelte.

It's recommended to enable these options in this formatter and disable the corresponding rules in eslint-plugin-vue and eslint-plugin-svelte if you used. This will make ESLint faster because less rules will be executed.

Getting Started

dprint

We've provided dprint integration.

This plugin only formats HTML syntax of your HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, Vento, Mustache, Handlebars and XML files. You also need other dprint plugins to format the code in and tags. You can use dprint-plugin-typescript to format TypeScript/JavaScript code and Malva to format CSS/SCSS/Sass/Less code.

Run the commands below to add plugins:

bash
dprint config add g-plane/markup_fmt
dprint config add g-plane/malva
dprint config add typescript

If you also want to format JSON in `` tag whose "type" is "importmap", "application/json", or "application/ld+json", you can add dprint-plugin-json:

bash
dprint config add json

If you want to format Jinja, it's recommended to add Pretty Jinja dprint plugin as well.

After adding the dprint plugins, update your dprint.json and add configuration:

jsonc
{
  // ...
  "plugins": [
    // ... other plugins URL
    "https://plugins.dprint.dev/g-plane/markup_fmt-v0.27.3.wasm"
  ],
  "markup": { // <-- the key name here is "markup", not "markup_fmt"
    // config comes here
  }
}

You can also read dprint CLI documentation for using dprint to format files.

Use as a Rust crate

Please read the documentation.

Configuration

Please refer to Configuration.

Credit

Tests come from:

  • Prettier
  • prettier-plugin-svelte
  • prettier-plugin-astro

License

MIT License

Copyright (c) 2023-present Pig Fang

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustastrodprintdprint-pluginformatter

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架