Skip to content

Commit

Permalink
Change order according to feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
FloEdelmann committed Jun 8, 2020
1 parent ec70f8b commit 0aa0765
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions docs/rules/order-in-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ export default {
"mixins",
["provide", "inject"],
"ROUTER_GUARDS",
"layout",
"middleware",
"validate",
"scrollToTop",
"transition",
"loading",
"inheritAttrs",
"model",
["props", "propsData"],
Expand All @@ -84,18 +88,14 @@ export default {
"fetch",
"asyncData",
"data",
"head",
"computed",
"watch",
"watchQuery",
"LIFECYCLE_HOOKS",
"methods",
"head",
"layout",
["template", "render"],
"renderError",
"transition",
"loading",
"scrollToTop"
"renderError"
]
}]
}
Expand Down
14 changes: 7 additions & 7 deletions lib/rules/order-in-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ const defaultOrder = [
'mixins',
['provide', 'inject'], // for Vue.js 2.2.0+

// Page Validation (determines if the router request is suitable)
// Page Options (component rendered as a router page)
'ROUTER_GUARDS', // for Vue Router
'layout', // for Nuxt
'middleware', // for Nuxt
'validate', // for Nuxt
'scrollToTop', // for Nuxt
'transition', // for Nuxt
'loading', // for Nuxt

// Interface (the interface to the component)
'inheritAttrs',
Expand All @@ -51,6 +55,7 @@ const defaultOrder = [
'fetch', // for Nuxt
'asyncData', // for Nuxt
'data',
'head', // for Nuxt
'computed',

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

// Rendering (the declarative description of the component output)
'head', // for Nuxt
'layout', // for Nuxt
['template', 'render'],
'renderError',
'transition', // for Nuxt
'loading', // for Nuxt
'scrollToTop' // for Nuxt
'renderError'
]

const groups = {
Expand Down

0 comments on commit 0aa0765

Please sign in to comment.