devEnginesValidity
Enforces that the
devEnginesproperty is valid.
✅ This rule is included in the package-json logical presets.
This rule checks that the devEngines property is an object with only cpu, libc, os, packageManager, and runtime properties.
Each dev engine entry should be an object or array of objects with a name property and optional version and onFail properties.
Examples
Section titled “Examples”{ "devEngines": { "runtime": {} }}{ "devEngines": { "runtime": { "name": 123, "onFail": "kaboom" } }}{ "devEngines": { "runtime": { "name": "node", "version": "^20.19.0 || >=22.12.0", "onFail": "download" } }}{ "devEngines": { "runtime": [ { "name": "node" }, { "name": "bun", "onFail": "warn" } ] }}When Not To Use It
Section titled “When Not To Use It”If you don’t need compliance with npm’s devEngines field specification, you can disable this rule.
For example, if your package manager supports additional devEngines properties, this rule may not be correct for you.
Related Rules
Section titled “Related Rules”- devEnginesPresence - Enforces that the
devEnginesproperty is present.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
package-json/valid-devEngines
Made with ❤️🔥 around the world by
the Flint team and contributors.