Skip to content

Rule: vue/sort-props #601

Closed
Closed
@jpickwell

Description

@jpickwell

Please describe what the rule should do:

Allow enforcing a sort order for props.

What category of rule is this? (place an "X" next to just one item)

[X] Enforces code style
[ ] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)

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

/* eslint "vue/sort-props": [2. "asc"] */
{
  props: {
    required: Boolean,
    disabled: Boolean // error
  }
}
/* eslint "vue/sort-props": [2. "desc"] */
{
  props: {
    disabled: Boolean,
    required: Boolean // error
  }
}

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