What problem does this address?
As-is, @wordpress/use-recommended-components is all-or-nothing. It doesn't allow fine-grained control over what components are acceptable/not acceptable, which makes it hard to early-adopt components or gradually transition from old ones.
What is your proposed solution?
It'd also be good if the plugin were modified with some config overrides:
- disable warnings on specific components
- allow one to extend the
ALLOWLIST so they can use experimental components as desired.
- allow one to extend the
DENYLIST so they can incrementally tighten the set of components to replace over a transition period.
Originally posited here: Automattic/jetpack#48487 (comment)
Off-topic, but I'll also note that in Jetpack we use eslint-changed, which allows us to apply lints more selectively on legacy files (apply them to all files unless they're on an legacy excludelist, in which case it only applies the lint to changed lines). That might be worth looking into.
What problem does this address?
As-is,
@wordpress/use-recommended-componentsis all-or-nothing. It doesn't allow fine-grained control over what components are acceptable/not acceptable, which makes it hard to early-adopt components or gradually transition from old ones.What is your proposed solution?
It'd also be good if the plugin were modified with some config overrides:
ALLOWLISTso they can use experimental components as desired.DENYLISTso they can incrementally tighten the set of components to replace over a transition period.Originally posited here: Automattic/jetpack#48487 (comment)
Off-topic, but I'll also note that in Jetpack we use
eslint-changed, which allows us to apply lints more selectively on legacy files (apply them to all files unless they're on an legacy excludelist, in which case it only applies the lint to changed lines). That might be worth looking into.