Skip to content

Commit 0aa0765

Browse files
committed
Change order according to feedback
1 parent ec70f8b commit 0aa0765

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

docs/rules/order-in-components.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ export default {
7474
"mixins",
7575
["provide", "inject"],
7676
"ROUTER_GUARDS",
77+
"layout",
7778
"middleware",
7879
"validate",
80+
"scrollToTop",
81+
"transition",
82+
"loading",
7983
"inheritAttrs",
8084
"model",
8185
["props", "propsData"],
@@ -84,18 +88,14 @@ export default {
8488
"fetch",
8589
"asyncData",
8690
"data",
91+
"head",
8792
"computed",
8893
"watch",
8994
"watchQuery",
9095
"LIFECYCLE_HOOKS",
9196
"methods",
92-
"head",
93-
"layout",
9497
["template", "render"],
95-
"renderError",
96-
"transition",
97-
"loading",
98-
"scrollToTop"
98+
"renderError"
9999
]
100100
}]
101101
}

lib/rules/order-in-components.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ const defaultOrder = [
3030
'mixins',
3131
['provide', 'inject'], // for Vue.js 2.2.0+
3232

33-
// Page Validation (determines if the router request is suitable)
33+
// Page Options (component rendered as a router page)
3434
'ROUTER_GUARDS', // for Vue Router
35+
'layout', // for Nuxt
3536
'middleware', // for Nuxt
3637
'validate', // for Nuxt
38+
'scrollToTop', // for Nuxt
39+
'transition', // for Nuxt
40+
'loading', // for Nuxt
3741

3842
// Interface (the interface to the component)
3943
'inheritAttrs',
@@ -51,6 +55,7 @@ const defaultOrder = [
5155
'fetch', // for Nuxt
5256
'asyncData', // for Nuxt
5357
'data',
58+
'head', // for Nuxt
5459
'computed',
5560

5661
// Events (callbacks triggered by reactive events)
@@ -62,13 +67,8 @@ const defaultOrder = [
6267
'methods',
6368

6469
// Rendering (the declarative description of the component output)
65-
'head', // for Nuxt
66-
'layout', // for Nuxt
6770
['template', 'render'],
68-
'renderError',
69-
'transition', // for Nuxt
70-
'loading', // for Nuxt
71-
'scrollToTop' // for Nuxt
71+
'renderError'
7272
]
7373

7474
const groups = {

0 commit comments

Comments
 (0)