Supported Languages
gruft supports a variety of languages and markup types. Below is a list of supported languages and the formatters and linters used for each.
Key
- ✅: Supported
- 🚫: Not in progress
- ⌛️: In progress
- ⚠️: Partially supported (with some caveats)
Formatters
Language/Markup | Formatter | Extension | Default | Status |
---|---|---|---|---|
Astro | markup_fmt | .astro | ✅ | ⌛️ |
CSS | Biome | .css | 🚫 | |
CSS | Malva | .css | ✅ | 🚫 |
Go | gofumpt | .go | ✅ | 🚫 |
HTML | markup_fmt | .html ,.htm | ✅ | ⌛️ |
JavaScript | Biome | .js ,.cjs ,.mjs | ✅ | ✅ |
JavaScript | dprint | .js ,.cjs ,.mjs | 🚫 | |
Jinja | markup_fmt | .jinja , .jinja2 | ✅ | ⌛️ |
JSON | Biome | .json | ✅ | ✅ |
JSON | dprint | .json | ⌛️ | |
JSONC | Biome | .jsonc | ✅ | ✅ |
JSONC | dprint | .jsonc | ⌛️ | |
JSX | Biome | .jsx | ✅ | ✅ |
JSX | dprint | .jsx | ⌛️ | |
Jupyter | dprint | ✅ | 🚫 | |
Less | Malva | ✅ | 🚫 | |
Markdown | dprint | ✅ | 🚫 | |
Nunjucks | markup_fmt | .njk | ✅ | ⌛️ |
Python | Ruff | ✅ | 🚫 | |
Sass | Malva | ✅ | 🚫 | |
SCSS | Malva | ✅ | 🚫 | |
Shell (Bash) | shfmt | .bash ,.sh | ✅ | ✅ |
Shell (Bats) | shfmt | .bats ,.sh | ✅ | ✅ |
Shell (POSIX) | shfmt | .sh | ✅ | ✅ |
Shell (MirBSD Korn) | shfmt | .mksh ,.sh | ✅ | ✅ |
SQL | sqlformat-rs | .sql | ✅ | ✅ |
Svelte | markup_fmt | ✅ | ⌛️ | |
TOML | taplo | .toml | ✅ | ✅ |
Twig | markup_fmt | .twig | ✅ | ⌛️ |
TypeScript | Biome | .ts ,.cts ,.mts | ✅ | ✅ |
TypeScript | dprint | .ts ,.cts ,.mts | 🚫 | |
TSX | Biome | ✅ | 🚫 | |
TSX | dprint | 🚫 | ||
Vento | markup_fmt | .vto | ✅ | ⌛️ |
Vue | markup_fmt | .vue | ✅ | ⌛️ |
YAML | yamlfmt | ✅ | 🚫 |
Linters
Currently, linting is not supported but is on the roadmap. Track progress on GitHub.
Language/Markup | Linter | Default | Status |
---|---|---|---|
JavaScript | Biome | ✅ | 🚫 |
JavaScript | oxlint | 🚫 | |
JSON | Biome | ✅ | 🚫 |
JSONC | Biome | ✅ | 🚫 |
JSX | Biome | ✅ | 🚫 |
JSX | oxlint | 🚫 | |
Python | Ruff | ✅ | 🚫 |
Shell | shellcheck | ✅ | 🚫 |
TypeScript | Biome | ✅ | 🚫 |
TypeScript | oxlint | 🚫 | |
TSX | Biome | ✅ | 🚫 |
TSX | oxlint | 🚫 |
Special Files
Certain well-known files or extensions are specially included into our language matcher to ensure they are formatted correctly.
Name | File/Extension | Language |
---|---|---|
dotenv | .env ,.env.* | Shell (Bash) |
hosts | hosts | Shell (Bash) |
JvmOptions | jvm.options ,*.vmoptions | Shell (Bash) |
nvmrc | .node-version ,.nvmrc | Shell (Bash) |
properties | .properties | Shell (Bash) |
Contributing
For any issues regarding formatters and linters, please make an issue in the gruft
repository and we'll upstream any source issues.
Also, consider starring any tools used to support them as well!