💼 This rule is enabled in the ✅ recommended
config.
💡 This rule is manually fixable by editor suggestions.
This rule flags all empty arrays and objects in a package.json
,
as such empty expressions do nothing, and are often the result of a mistake.
It will report both named properties that are empty, as well as nested arrays and objects
that are empty.
Example of incorrect code for this rule:
{
"main": "lib/index.js",
"scripts": {},
"files": [],
"simple-git-hooks": {
"pre-commit": "pnpm exec nano-staged --allow-empty",
"preserveUnused": []
}
}
Example of correct code for this rule:
{
"main": "lib/index.js",
"simple-git-hooks": {
"pre-commit": "pnpm exec nano-staged --allow-empty"
}
}