valid-devEngines
💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.
This rule uses package-json-validator to validate the devEngines property, if present, against the following criteria:
- It should be an
objectwith any of the following propertiescpulibcospackageManagerruntime
- The value of each property should be an object or an Array of objects with the following properties:
name(required): the name of the engine, e.g. “node”, “npm”, “yarn”, “bun”version(optional): the version of the engine, which should be a valid semver rangeonFail(optional): should be one of the following values:warn,error,ignoreordownload
Examples
Section titled “Examples”{ "devEngines": { "node": ">=24.0.0" }}{ "devEngines": { "runtime": { "name": "node", "version": "^20.19.0 || >=22.12.0", "onFail": "download" }, "packageManager": { "name": "pnpm", "version": "^10.0.0", "onFail": "error" } }}Related Rules
Section titled “Related Rules”require-devEngines- Enforces that thedevEnginesproperty is present.