valid-devEngines
💼 This rule is enabled in the following configs: ✔️ legacy-recommended, ✅ recommended, 📦 recommended-publishable.
This rule does the following checks on the value of the devEngines property:
- 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
Example of incorrect code for this rule:
{ "devEngines": { "node": ">=24.0.0" }}Example of correct code for this rule:
{ "devEngines": { "runtime": { "name": "node", "version": "^20.19.0 || >=22.12.0", "onFail": "download" }, "packageManager": { "name": "pnpm", "version": "^10.0.0", "onFail": "error" } }}