Skip to main content

prefer-no-main

Enabling this rule will result in an error being generated if main is present.

Example .npmpackagejsonlintrc configuration​

{
"rules": {
"prefer-no-main": "error"
}
}

Rule Details​

Incorrect example(s)​

{
"main": "src/NpmPackageJsonLint.js"
}

Correct example(s)​

{
}

History​

  • Introduced in version 10.2.0