valid-os
💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.
This rule uses package-json-validator to validate the os property, if present, against the following criteria:
- It must be an Array
- All items in the Array should be one of the following: “aix”, “android”, “darwin”, “freebsd”, “linux”, “openbsd”, “sunos”, and “win32”
Examples
Section titled “Examples”{ "os": ["x64"]}{ "os": ["linux", "win32"]}Related Rules
Section titled “Related Rules”require-os- Enforces that theosproperty is present.