Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule: vue/sort-props #601

Closed
jpickwell opened this issue Oct 9, 2018 · 6 comments
Closed

Rule: vue/sort-props #601

jpickwell opened this issue Oct 9, 2018 · 6 comments

Comments

@jpickwell
Copy link

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
  }
}
@armano2
Copy link
Collaborator

armano2 commented Nov 8, 2018

duplicate #541

@jpickwell
Copy link
Author

@armano2, that one is talking about sorting the keys inside a prop; i'm talking about just sorting the props themselves

@armano2
Copy link
Collaborator

armano2 commented Nov 8, 2018

@jpickwell well i got confused a little sorry 👍

@jpickwell
Copy link
Author

Understandable.

@loren138
Copy link
Contributor

Closed by #997

@ota-meshi
Copy link
Member

Thank you @loren138!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants