erbfmt v0.1.0
erbfmt 0.1.0
The first public pre-release of erbfmt, a Rust formatter and linter for Rails
*.html.erb templates.
Highlights
- Formats HTML nesting and ERB control flow together.
- Supports
if,unless,case,do,begin, and their branch markers. - Wraps long HTML tags and safely recognized standalone ERB calls.
- Lints ERB structure, HTML tag balance, nesting, attributes, deprecated tags,
and HTML5 self-closing syntax. - Provides
erbfmt.json, ignore directives,--write,--check, and--lint. - Includes a VS Code extension with HTML ERB highlighting, formatting,
diagnostics, and ERB-safe comment toggling.
Install
Download the archive for your platform from the assets below, extract it, and
place erbfmt or erbfmt.exe on your PATH.
- Linux x64:
x86_64-unknown-linux-gnu - macOS Intel:
x86_64-apple-darwin - macOS Apple Silicon:
aarch64-apple-darwin - Windows x64:
x86_64-pc-windows-msvc
Verify the installation with:
erbfmt --versionEach standalone archive has a matching .sha256 file. On systems with
sha256sum, verify it with:
sha256sum -c <archive-name>.sha256Platform-specific .gem files are also attached and can be installed locally:
gem install --local ./erbfmt-0.1.0-<platform>.gemInstall the VS Code extension with:
code --install-extension erbfmt-vscode-0.1.0.vsixThe VS Code extension does not bundle the CLI. Install a standalone binary or
gem first, or configure erbfmt.command explicitly.
Known Limitations
- Ruby expressions are not parsed as a full Ruby AST.
- Rails application semantics are not analyzed.
- Ambiguous Ruby expressions are preserved instead of aggressively rewritten.
- Initial releases are distributed only through GitHub Releases, not package
registries or extension marketplaces.