require-types
Enabling this rule will result in an error being generated if types
is missing from the package.json file.
Example .npmpackagejsonlintrc configuration
{
"rules": {
"require-types": "error"
}
}
Rule Details
Incorrect example(s)
{
}
Correct example(s)
{
"types": "./lib/main.d.ts"
}
Related
Notes
See https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html for more details.
History
- Introduced in version 3.7.0