Skip to content

Commit ec70f8b

Browse files
committed
Update rule docs
1 parent 4ac0671 commit ec70f8b

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

docs/rules/order-in-components.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,31 +65,48 @@ export default {
6565
"order": [
6666
"el",
6767
"name",
68+
"key",
6869
"parent",
6970
"functional",
7071
["delimiters", "comments"],
7172
["components", "directives", "filters"],
7273
"extends",
7374
"mixins",
75+
["provide", "inject"],
76+
"ROUTER_GUARDS",
77+
"middleware",
78+
"validate",
7479
"inheritAttrs",
7580
"model",
7681
["props", "propsData"],
82+
"emits",
83+
"setup",
7784
"fetch",
7885
"asyncData",
7986
"data",
8087
"computed",
8188
"watch",
89+
"watchQuery",
8290
"LIFECYCLE_HOOKS",
8391
"methods",
8492
"head",
93+
"layout",
8594
["template", "render"],
86-
"renderError"
95+
"renderError",
96+
"transition",
97+
"loading",
98+
"scrollToTop"
8799
]
88100
}]
89101
}
90102
```
91103

92-
- `order` (`(string | string[])[]`) ... The order of properties. Elements are the property names or `LIFECYCLE_HOOKS`. If an element is the array of strings, it means any of those can be placed there unordered. Default is above.
104+
- `order` (`(string | string[])[]`) ... The order of properties. Elements are the property names or one of the following groups:
105+
106+
- `LIFECYCLE_HOOKS`: [Vue Lifecycle Events](https://vuejs.org/v2/guide/instance.html#Lifecycle-Diagram), in the order they are called
107+
- `ROUTER_GUARDS`: [Vue Router Navigation Guards](https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards), in the order they are called
108+
109+
If an element is an array of strings, it means any of those can be placed there unordered. Default is above.
93110

94111

95112
## :books: Further reading

0 commit comments

Comments
 (0)