Description
Hi @chrisvfritz.
In the Styleguide, the rules about options order said the correct order in a normal case is:
module.exports = {
...,
data: function () {
return {}
},
...,
template: `<div>
<div></div>
</div>`
}
but, the rules about top-level element order in SFC said:
Single-file components should always order
template
,script
, andstyle
tags consistently, with<style>
last.
So the way this sentence is written suggest that order:
<template>
<div>
<div></div>
</div>
</template>
<script>
module.exports = {
data: function () {
return {}
}
}
</script>
This is exactly the inverse of previous rules.
So I suggest changing this sentence by:
Single-file components should always order
script
,template
, andstyle
tags consistently, with<style>
last.
and change good example order place:
<!-- ComponentA.vue -->
<script>/* ... */</script>
<template>...</template>
<style>/* ... */</style>
<!-- ComponentB.vue -->
<script>/* ... */</script>
<template>...</template>
<style>/* ... */</style>
example before:
<!-- ComponentA.vue -->
<template>...</template>
<script>/* ... */</script>
<style>/* ... */</style>
<!-- ComponentB.vue -->
<template>...</template>
<script>/* ... */</script>
<style>/* ... */</style>
That not said the others order is not possible, but that bring consistency in rules
What is your thought? (Yeah I know is not a horrible problem, but if it's just little better, why not?)