dagger toolchain install github.com/dagger/prettier
check: Check that if the files are formatted.write: Rewrite all processed files in place.
The toolchain can be customized in your dagger.json to meet your needs:
{
"name": "my-module",
"engineVersion": "...",
"toolchains": [
{
"name": "prettier",
"source": "github.com/dagger/prettier@main",
"pin": "...",
"customizations": [
{
"argument": "source",
"defaultPath": "/src", # default: /; custom default path
"ignore": ["**/node_modules"] # custom ignore filter
},
{
"argument": "baseImageAddress",
"default": "node:22" # default: node:25-alpine; use any container image
},
{
"argument": "packageManager",
"default": "yarn" # default: npm; alternatively use yarn, pnpm, or bun
}
]
}
]
}