Files
renovate-config/default.json
Peter Siegmund 200f660205 feat: run prettier after npm updates so format bumps stay green
A prettier version bump changes prettier's canonical output, so files
that were correctly formatted under the old version now fail
`prettier --check` in CI — the update PR goes red and never automerges.
This happened on castaway with prettier 3.8.3 -> 3.9.6 (two files
reformatted: a union type collapsed to one line, a Svelte closing tag
pulled onto the attribute line).

Add a npm-scoped postUpgradeTasks that runs `npm run format` once per
branch after the upgrade and commits the result. `--if-present` makes it
a no-op in npm repos without a format script; matchManagers npm keeps it
away from the gradle/maven and firmware repos that share this preset.

Requires the self-hosted Renovate instance to whitelist the command via
allowedCommands (e.g. RENOVATE_ALLOWED_COMMANDS='^npm run format') — that
is a global/self-hosted-only option and cannot be set from this preset.

Signed-off-by: Peter Siegmund <peter.siegmund@entwicklung.eq-3.de>
2026-07-25 01:59:24 +02:00

83 lines
2.6 KiB
JSON

{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended", ":dependencyDashboard"],
"timezone": "Europe/Berlin",
"schedule": ["* 0-6 * * 1"],
"prConcurrentLimit": 5,
"minimumReleaseAge": "3 days",
"internalChecksFilter": "strict",
"platformAutomerge": true,
"osvVulnerabilityAlerts": true,
"vulnerabilityAlerts": {
"minimumReleaseAge": null,
"schedule": ["at any time"]
},
"lockFileMaintenance": {
"enabled": true,
"schedule": ["* 0-6 * * 1"],
"automerge": true
},
"packageRules": [
{
"description": "Nach npm-Updates Prettier laufen lassen: Formatierungs-Bumps (z.B. prettier selbst) formatieren bestehende Dateien um, sonst schlaegt prettier --check in der CI fehl. --if-present no-op't in Repos ohne format-Script. Benoetigt allowedCommands in der self-hosted Renovate-Config.",
"matchManagers": ["npm"],
"postUpgradeTasks": {
"commands": ["npm run format --if-present"],
"fileFilters": ["**/*"],
"executionMode": "branch"
}
},
{
"description": "npm devDependencies (non-major) gesammelt, automerge bei gruener CI",
"matchManagers": ["npm"],
"matchDepTypes": ["devDependencies"],
"matchUpdateTypes": ["minor", "patch"],
"groupName": "devDependencies (non-major)",
"automerge": true
},
{
"description": "CI actions gesammelt, automerge bei gruener CI",
"matchManagers": ["github-actions"],
"groupName": "CI actions",
"automerge": true
},
{
"description": "Storybook nur gemeinsam updaten, sonst brechen die peer deps (ERESOLVE)",
"matchPackageNames": [
"storybook",
"@storybook/**",
"@chromatic-com/storybook",
"eslint-plugin-storybook"
],
"groupName": "storybook"
},
{
"description": "Svelte- und Frontend-Toolchain zusammen, ohne automerge",
"matchPackageNames": [
"svelte",
"@sveltejs/**",
"svelte-check",
"vite",
"tailwindcss",
"@tailwindcss/**"
],
"groupName": "svelte + build toolchain"
},
{
"description": "Spring Boot und Kotlin zusammen, ohne automerge",
"matchPackageNames": [
"org.springframework.boot**",
"org.springframework.modulith**",
"io.spring.dependency-management**",
"org.jetbrains.kotlin**"
],
"groupName": "spring + kotlin"
},
{
"description": "Major-Updates nur nach Freigabe im Dependency Dashboard",
"matchUpdateTypes": ["major"],
"dependencyDashboardApproval": true
}
]
}