[Rule Request] Element Attribute Order
See original GitHub issueNot exactly sure how to call this rule. Pretty much what I want is a rule that would throw on incorrect order inside of Element/Component invocation.
For example: Take this component:
<MyComp @name="test" data-test="123" @doSomething={{action "gogogo"}} class="flex" />
There is no order to the attributes/modifiers etc
I think there should be an order such that class
is first, then data-test
then props
then actions
Any thoughts?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:22 (14 by maintainers)
Top Results From Across the Web
vue/attributes-order
Rule Details #. This rule aims to enforce ordering of component attributes. The default order is specified in the Vue.js Style Guide and...
Read more >Capture request attributes based on web request data
Request attribute rules Rules are executed in order. If a request meets the criteria for both rules, its value will be taken...
Read more >valid order for attributes of input type tag - html - Stack Overflow
There is no predefined order for the attributes in terms of passing w3c validation... it's completely up to you. However, you should introduce ......
Read more >Create and manage attribute rules—ArcGIS Pro | Documentation
Evaluation order (Calculation rules); Exclude from application evaluation. To make changes to an existing attribute rule, complete the following steps: In the ...
Read more >XML Schema Tutorial - Defining Elements and Attributes
Compositors provide rules that determine how and in what order there children can appear within XML document. There are three types of compositors...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I’d prefer:
...attributes
To move forward here I think we need something like the following steps:
component-invocation-order
,element-space-order
, some other name?)ElementNode
visitor that ensures the ordering is correctnode.attributes
into “arguments” and “attributes” based on a leading@
loc
information of each entry in the three categories (arguments
,attributes
, andmodifiers
) to see if they match our expected ordering@
starting entries innode.attributes
) are before thearguments
(the@
leading names innode.attributes
)How does that sound?
Available in v4.18.0, thanks @rob-long!