Skip to content

osValidity

Enforces that the os property is valid.

✅ This rule is included in the package-json logical presets.

This rule checks that the os property is an array where all items are valid OS values: “aix”, “android”, “darwin”, “freebsd”, “linux”, “openbsd”, “sunos”, and “win32”.

These values are the list of possible process.platform values documented by Node.

{
"os": ["x64"]
}

If you don’t need compliance with npm’s osValidity field specification, you can disable this rule. For example, if you use a different package manager that treats the field differently, this rule may not be correct for you.

  • osPresence - Enforces that the os property is present.
Made with ❤️‍🔥 around the world by the Flint team and contributors.