| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
Datastar attribute formatter — reflows Datastar data-* attributes and formats Datastar expressions in HTML, JSX, and TSX files.
cargo install --git https://github.com/hyperpuncher/dsfmt# Format a file (prints to stdout)
dsfmt src/components/slider.tsx
# Write changes back
dsfmt --write src/components/slider.tsx
# Format all supported files in a directory
dsfmt --write src/
# Check if files are formatted (exit code 1 if changes needed)
dsfmt --check src/
# Read from stdin
cat file.html | dsfmt| Flag | Default | Description |
|---|---|---|
| --line-width | 90 | Maximum line width before splitting |
| --use-spaces | false | Use spaces instead of tabs |
| --tab-width | 4 | Number of spaces per indent level |
| --write, -w | false | Write changes to files |
| --check | false | Exit 1 if formatting would change |
HTML, JSX, TSX, Templ, HEEx, Blade
| Back | FazBrowse Home | New Git URL |