Initialize it with (trunk init). All linters and formatters, as well as the version of Trunk itself, are versioned in .trunk/trunk.yaml (configs).
- Install Trunk →
curl https://get.trunk.io -fsSL | bash(docs) - Setup Trunk in your repo →
trunk init(docs) - Locally check your changes for issues →
trunk check(docs) - Locally format your changes →
trunk fmt(docs) - Make sure no lint and format issues leak onto
main
Example preset of .trunk/trunk.yaml:
version: 0.1
cli:
version: 0.18.0-beta
options:
- commands: [check, fmt]
- args: -y
plugins:
sources:
- id: trunk
ref: v0.0.4
uri: https://github.com/trunk-io/plugins
repo:
repo:
host: github.com
owner: z-shell
name: <repo>
actions:
enabled:
- trunk-check-pre-push
- trunk-fmt-pre-commit
- trunk-cache-prune
- trunk-check-upgrade
- trunk-upgrade
lint:
enabled:
- git-diff-check@SYSTEM
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]Example preset of .github/renovate.json:
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["local>z-shell/.github:renovate-config"]
}Store Renovate configuration as above in one of these locations:
renovate.json
renovate.json5
.github/renovate.json
.github/renovate.json5
.gitlab/renovate.json
.gitlab/renovate.
.renovaterc
.renovaterc.json
package.json (within a "renovate" section)