Skip to main content

os-type

Enabling this rule will result in an error being generated if the value in os is not an array.

Example .npmpackagejsonlintrc configuration

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

Rule Details

Incorrect example(s)

{
"os": 1
}
{
"os": {
"name": "linux"
}
}
{
"os": "linux"
}

Correct example(s)

{
"os": ["linux"]
}

History

  • Introduced in version 1.0.0