mo-fmt
v0.10.2
Published
An easy-to-use Motoko formatter command.
Downloads
284
Readme
mo-fmt ·
An easy-to-use Motoko formatter command.
Setup
If you have Node.js installed on your system:
npm install -g mo-fmt
This command is also available using npx, e.g. npx mo-fmt
.
For environments without Node.js, you can also download a portable executable from the GitHub releases page.
Usage
# Format all Motoko files in-place
mo-fmt **/*.mo
# Format `File.mo` in-place
mo-fmt File.mo
# Format `File.mo` and all Motoko files in the `lib/` directory
mo-fmt File.mo lib/*.mo
# Check that all files are formatted
mo-fmt -c **/*.mo
# Show help information
mo-fmt