Skip to content

Add an option to v-slot-style to enforce even shorter syntax for default slot #2977

@andreww2012

Description

@andreww2012

What rule do you want to change?

v-slot-style

Does this change cause the rule to produce more or fewer warnings?

Depends

How will the change be implemented? (New option, new default behavior, etc.)?

Add a new style, say shortest, which would act the same as shorthand for non-default slots and additionally suggest using # instead of #default (see an example below).

Please provide some example code that this change will affect:

It is possible to use an even shorter syntax of v-slot with the default slot: simply # (without default word) (playground):

<Comp #="{foo}">...</Comp>

<Comp>
  <template #="{foo}">...</template>
</Comp>

What does the rule currently do for this code?

Currently, it seems like # attributes are ignored by this rule completely.

What will the rule do after it's changed?

# attributes will be recognized and reported if they don't satisfy the enforced style.

Additional context

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