Skip to main content

files-type

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

Example .npmpackagejsonlintrc configuration

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

Rule Details

Incorrect example(s)

{
"files": 2
}
{
"files": "src, tests"
}
{
"files": {
"src": "true",
"tests": "true"
}
}

Correct example(s)

{
"files": ["src", "tests"]
}

History

  • Introduced in version 0.1.0