Skip to content

Herb Configuration

Package: @herb-tools/config


Shared configuration utilities for Herb. Provides a unified way to load, validate, and manage configuration across the Herb ecosystem including the linter, formatter, and language server.

Installation

shell
npm add @herb-tools/config
shell
pnpm add @herb-tools/config
shell
yarn add @herb-tools/config
shell
bun add @herb-tools/config

Usage

.herb.yml

The configuration is stored in a .herb.yml file in the project root:

.herb.yml
yaml
version: 0.7.5

linter:
  enabled: true
  rules:
    erb-no-extra-newline:
      enabled: false

formatter:
  enabled: true
  indentWidth: 2
  maxLineLength: 120

Configuration Hierarchy

The Herb tools follow this configuration priority:

  1. Project configuration (.herb.yml file) - Highest priority
  2. Editor settings (VS Code workspace/user settings)
  3. Default settings - Fallback when no other configuration exists

This allows teams to share consistent settings via .herb.yml while still allowing individual developer preferences when no project configuration exists.

Released under the MIT License.