Skip to content

[Proposal] Fuzzy search for unrecognized components #811

@austinkelleher

Description

@austinkelleher

Currently when using an unrecognized tag, a user is provided an error.

Template:

<hallo/>

Error:

Unrecognized tag: hallo - More details: https://github.com/marko-js/marko/wiki/Error:-Unrecognized-Tag

The user may have either:

  • Made a typo
  • Not realized that the component that they're trying to use isn't in the correct scope

We could use fuzzy search to provide a more clear error message that suggests a component name and whether the component is actually in scope or not:

In scope:

Unrecognized tag: "hello". Did you mean "hello"? - More details: https://github.com/marko-js/marko/wiki/Error:-Unrecognized-Tag

Out of scope:

Unrecognized tag: "hello". Did you mean "hello"? The "hello" tag is not in the available scope of this component. - More details: https://github.com/marko-js/marko/wiki/Error:-Unrecognized-Tag

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions