@neuralfog/elemix-template-formatter
v0.9.5
Published
HTML template formatter for Elemix tpl`` literals (etf)
Readme
Elemix template formatter
etf - a standalone formatter for tpl templates.
Usage
Install as a dev dependency:
pnpm add -D @neuralfog/elemix-template-formatterRun it from your package scripts:
"scripts": {
"lint:tpl": "etf --dirs src",
"lint:tpl:fix": "etf --dirs src --write"
}pnpm lint:tpl # check: exit 1 if anything is unformatted
pnpm lint:tpl:fix # fix: rewrite in placeConfiguration
Config is read from an elemix.toml file at your project root:
[formatter]
enabled = true # false turns the formatter off entirely
indent_style = "space" # "space" (default) or "tab"
indent_width = 4 # columns per indent level
line_width = 80 # max line widthThe full setup is shown in the elemix template.
