Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Rule Proposal: Validate "emits" section #1787

Copy link
Copy link
Open
@iliubinskii

Description

@iliubinskii
Issue body actions

Please describe what the rule should do:

This rule proposal is based on this issue:
vuejs/core#5343

It should ensure that emits section does not break vue component typing.

What category should the rule belong to?

Warns about a potential error (problem)

Provide 2-3 code examples that this rule should warn about:

Valid:

export default defineComponent({
  name: "Sample",
  emits: {
    event1(this: undefined): boolean { return true; },
    event2: (): boolean => { return true; },
    event3: function(this: undefined): boolean { … }
  },

Invalid:

export default defineComponent({
  name: "Sample",
  emits: {
    event(): boolean { return true; },
    event: function(): boolean { … }
  },

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.