Skip to content

devEnginesValidity

Enforces that the devEngines property 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.

{
"devEngines": {
"runtime": {}
}
}
{
"devEngines": {
"runtime": {
"name": 123,
"onFail": "kaboom"
}
}
}

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.

Made with ❤️‍🔥 around the world by the Flint team and contributors.