You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add option to sort shorthand properties on jsx-sort-props
You can now require that shorthand props should come before
all other props, but still respecting the alphabetical order.
The following are valid situations:
```
<Component a b="b" />
<Component x z a="a" b="b" />
```
And the following are invalid:
```
<Component z x a="a" b="b" /> // should be in alphabetical order
<Component x z b="b" a="a" /> // should be in alphabetical order
<Component a="a" b="b" x z /> // shorthand props should be at the start
```
When `true`, short hand props must be listed before all other props, but still respecting the alphabetical order:
56
+
57
+
```js
58
+
<Hello active validate name="John" tel={5555555} />
59
+
```
60
+
52
61
## When not to use
53
62
54
63
This rule is a formatting preference and not following it won't negatively affect the quality of your code. If alphabetizing props isn't a part of your coding standards, then you can leave this rule off.
0 commit comments