main-type
Enabling this rule will result in an error being generated if the value in main
is not a string.
Example .npmpackagejsonlintrc configuration
{
"rules": {
"main-type": "error"
}
}
Rule Details
Incorrect example(s)
{
"main": 1
}
{
"main": ["src/NpmPackageJsonLint.js"]
}
{
"main": {
"app": "src/NpmPackageJsonLint.js"
}
}
Correct example(s)
{
"main": "src/NpmPackageJsonLint.js"
}
History
- Introduced in version 0.1.0