https://github.com/compwa/taplo-pre-commit
A pre-commit hook for Taplo, a TOML formatter written in Rust
https://github.com/compwa/taplo-pre-commit
pre-commit rust toml toml-formatter
Last synced: 9 months ago
JSON representation
A pre-commit hook for Taplo, a TOML formatter written in Rust
- Host: GitHub
- URL: https://github.com/compwa/taplo-pre-commit
- Owner: ComPWA
- Created: 2023-02-09T10:48:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-05T14:06:21.000Z (over 1 year ago)
- Last Synced: 2025-03-29T05:22:13.970Z (10 months ago)
- Topics: pre-commit, rust, toml, toml-formatter
- Homepage: https://github.com/tamasfe/taplo
- Size: 41 KB
- Stars: 17
- Watchers: 7
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pre-commit hook for the Taplo TOML formatter
Mirror of [github.com/tamasfe/taplo](https://github.com/tamasfe/taplo) and the [`taplo` PyPI package](https://pypi.org/project/taplo) for [pre-commit](https://pre-commit.com).
### Using Taplo with pre-commit
Add this to your `.pre-commit-config.yaml`
```yaml
repos:
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
```
To get the [latest release](https://github.com/ComPWA/taplo-pre-commit/releases), run
```shell
pre-commit autoupdate --repo https://github.com/ComPWA/taplo-pre-commit
```
Optionally, you can also install the Taplo linter as a pre-commit hook:
```yaml
repos:
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
- id: taplo-lint
```