Skip to content

Add @wordpress/use-recommended-components config options #78062

@tbradsha

Description

@tbradsha

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions