As @Gaël J suggested, the more appropriate option is to use 'matchCurrentVersion'.
renovate.json:
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"packageRules": [
{
"matchPackageNames": ["chalk"],
"matchCurrentVersion": "/java$/"
"enabled": false
}
]
}
This now disables the check and subsequently disables the generation of the PR:
"deps": [
{
"depType": "devDependencies",
"depName": "chalk",
"currentValue": "2.5.2-java",
"datasource": "npm",
"prettyDepType": "devDependency",
"updates": [],
"packageName": "chalk",
"skipReason": "disabled"
}
],