Rule Proposal `vue/attribute-order`
See original GitHub issuePlease describe what the rule should do:
Provide a template rule to enforce placing vue-specific attributes before other properties in a template tag.
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:
Configuration
‘vue/closing-bracket-location’: [‘alphabetical’ | ‘vue-first’]
Examples:
// bad
<a
v-tooltip
class="btn external-url"
data-container="body"
target="_blank"
rel="noopener noreferrer nofollow"
:title="title"
:aria-label="title"
:href="externalUrl">
// good
<a
v-tooltip
:title="title"
:aria-label="title"
:href="externalUrl"
class="btn external-url"
data-container="body"
target="_blank"
rel="noopener noreferrer nofollow">
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:13 (6 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 >Vue.js style guide - GitLab Docs
With more than one attribute, all attributes should be on a new line: ... Properties in a Vue Component: Check order of properties...
Read more >eslint-plugin-weex-vue - npm Package Health Analysis | Snyk
We're using GitHub Releases. Contribution guide. In order to add a new rule, you should: Create issue on GH with description of proposed...
Read more >Models and Collections for Vue.js - Vue Models & Collections
Check if any of the or rules pass in the order that they were chained. Nested validation. If a model's "validateRecursively" option is...
Read more >Configuring searchable attributes the right way - Algolia
The order of searchable attributes directly affects search relevance: the engine considers attributes higher in the list more relevant than ...
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
https://vuejs.org/v2/style-guide/#Element-attribute-order-recommended is the best point of reference how the config should look like 😃
No, it hasn’t been taken forward yet. Feel free to submit PR with proposed changes - so we can challenge it 😃
Another idea for possible settings:
I think it would be even easier to set-up 😃