@herb-tools/config 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # Herb Configuration
2
+
3
+ **Package**: [`@herb-tools/config`](https://www.npmjs.com/package/@herb-tools/config)
4
+
5
+ ---
6
+
7
+ 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.
8
+
9
+ ## Installation
10
+
11
+ :::code-group
12
+ ```shell [npm]
13
+ npm add @herb-tools/config
14
+ ```
15
+
16
+ ```shell [pnpm]
17
+ pnpm add @herb-tools/config
18
+ ```
19
+
20
+ ```shell [yarn]
21
+ yarn add @herb-tools/config
22
+ ```
23
+
24
+ ```shell [bun]
25
+ bun add @herb-tools/config
26
+ ```
27
+ :::
28
+
29
+ ## Usage
30
+
31
+ ### `.herb.yml`
32
+
33
+ The configuration is stored in a `.herb.yml` file in the project root:
34
+
35
+ ```yaml [.herb.yml]
36
+ version: 0.8.0
37
+
38
+ linter:
39
+ enabled: true
40
+ rules:
41
+ erb-no-extra-newline:
42
+ enabled: false
43
+
44
+ formatter:
45
+ enabled: true
46
+ indentWidth: 2
47
+ maxLineLength: 120
48
+ ```
49
+
50
+ ## Configuration Hierarchy
51
+
52
+ The Herb tools follow this configuration priority:
53
+
54
+ 1. **Project configuration** (`.herb.yml` file) - Highest priority
55
+ 2. **Editor settings** (VS Code workspace/user settings)
56
+ 3. **Default settings** - Fallback when no other configuration exists
57
+
58
+ This allows teams to share consistent settings via `.herb.yml` while still allowing individual developer preferences when no project configuration exists.