Skip to main content

require-os

Enabling this rule will result in an error being generated if os is missing from the package.json file.

Example .npmpackagejsonlintrc configuration

{
"rules": {
"require-os": "error"
}
}

Rule Details

Incorrect example(s)

{

}

Correct example(s)

{
"os": ["linux"]
}

History

  • Introduced in version 1.0.0