An experimental code formatter for MDX.
Using the API:
npm i -D mdxfmt
Using the CLI:
npm i -g mdxfmt
Using the API:
const mdxfmt = require('mdxfmt')
const MDX = `
import { Box }
from 'grid-styled'
# Hello, world!
<div>
hi </div>
`
mdxfmt(MDX)
Using the CLI:
❯ mdxfmt help
MDX code formatter
Usage:
mdxfmt file.md
mdxfmt file.md > formatted.md
Key | Type | Description |
---|---|---|
jsx |
{} |
Options object passed to Prettier for formatting JSX |
md |
{} |
Options object passedt to Remark Stringify for formatting MD |