https://npmpackagejsonlint.org/docs/rules#require-node-rules has a bunch of require-* rules for requiring properties to exist, such as require-author, require-bin.
This seems like it'd do well as a general-purpose ESLint rule. It could:
- By default: enforce the required properties that will prompt a warning if missing
- By configuration: be extended to any arbitrary property
Maybe, package-json/require-properties or package-json/require-package-properties as a name? The latter seems a little overly specific, so I'm leaning towards require-properties maybe?
But, what about https://npmpackagejsonlint.org/docs/rules/#disallowed-node-rules? Should we unify into one big rule for requiring which properties do or don't exist?
I also think that https://npmpackagejsonlint.org/docs/rules/required-node/require-scripts can be treated as a subset of https://npmpackagejsonlint.org/docs/rules/scripts/prefer-scripts for this rule. As in, this same rule can require both that scripts exists and what values it contains. Someone please yell at me if that's not ideal.
Blocked on #40, but once that PR is merged this will be good to go. ✅
https://npmpackagejsonlint.org/docs/rules#require-node-rules has a bunch of
require-*rules for requiring properties to exist, such asrequire-author,require-bin.This seems like it'd do well as a general-purpose ESLint rule. It could:
Maybe,
package-json/require-propertiesorpackage-json/require-package-propertiesas a name? The latter seems a little overly specific, so I'm leaning towardsrequire-propertiesmaybe?But, what about https://npmpackagejsonlint.org/docs/rules/#disallowed-node-rules? Should we unify into one big rule for requiring which properties do or don't exist?
I also think that https://npmpackagejsonlint.org/docs/rules/required-node/require-scripts can be treated as a subset of https://npmpackagejsonlint.org/docs/rules/scripts/prefer-scripts for this rule. As in, this same rule can require both that
scriptsexists and what values it contains. Someone please yell at me if that's not ideal.Blocked on #40, but once that PR is merged this will be good to go.✅