Skip to main content

name-type

Enabling this rule will result in an error being generated if the value in name is not a string.

Example .npmpackagejsonlintrc configuration

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

Rule Details

Incorrect example(s)

{
"name": 1
}
{
"name": ["npm-package-json-lint"]
}
{
"name": {
"stable": "npm-package-json-lint"
}
}

Correct example(s)

{
"name": "npm-package-json-lint"
}

History

  • Introduced in version 0.1.0