Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@herb-tools/formatter

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@herb-tools/formatter

Auto-formatter for HTML+ERB templates with intelligent indentation, line wrapping, and ERB-aware pretty-printing.

Source
npmnpm
Version
0.4.3
Version published
Weekly downloads
7K
42.09%
Maintainers
1
Weekly downloads
 
Created
Source

Herb Formatter

Package: @herb-tools/formatter

[!WARNING] Experimental Preview This formatter is currently in experimental preview. While it works for many common cases, it may potentially corrupt files in edge cases. Only use on files that can be restored via git or other version control systems.

Auto-formatter for HTML+ERB templates with intelligent indentation, line wrapping, and ERB-aware pretty-printing.

Perfect for format-on-save in editors and formatting verification in CI/CD pipelines. Transforms templates into consistently formatted, readable code while preserving all functionality.

Installation

:::code-group

npm add @herb-tools/formatter
pnpm add @herb-tools/formatter
yarn add @herb-tools/formatter
bun add @herb-tools/formatter

:::

Usage

Format a file

# relative path
herb-format templates/index.html.erb

# absolute path
herb-format /full/path/to/template.html.erb

Format from stdin

cat template.html.erb | herb-format
# or explicitly use "-" for stdin
herb-format - < template.html.erb

FAQs

Package last updated on 03 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts