Skip to main content

require-type

Enabling this rule will result in an error being generated if type is missing from the package.json file.

Example .npmpackagejsonlintrc configuration

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

Rule Details

Incorrect example(s)

{

}

Correct example(s)

{
"type": "module"
}

History

  • Introduced in version 7.0.1