Skip to content

Commit 423a6ba

Browse files
committed
Add other Nuxt properties
1 parent ad70c98 commit 423a6ba

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/rules/order-in-components.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const defaultOrder = [
1313

1414
// Global Awareness (requires knowledge beyond the component)
1515
'name',
16+
'key', // for Nuxt
1617
'parent',
1718

1819
// Component Type (changes the type of the component)
@@ -29,6 +30,10 @@ const defaultOrder = [
2930
'mixins',
3031
['provide', 'inject'], // for Vue.js 2.2.0+
3132

33+
// Page Validation (determines if the router request is suitable)
34+
'middleware', // for Nuxt
35+
'validate', // for Nuxt
36+
3237
// Interface (the interface to the component)
3338
'inheritAttrs',
3439
'model',
@@ -49,15 +54,20 @@ const defaultOrder = [
4954

5055
// Events (callbacks triggered by reactive events)
5156
'watch',
57+
'watchQuery', // for Nuxt
5258
'LIFECYCLE_HOOKS',
5359

5460
// Non-Reactive Properties (instance properties independent of the reactivity system)
5561
'methods',
5662

5763
// Rendering (the declarative description of the component output)
5864
'head', // for Nuxt
65+
'layout', // for Nuxt
5966
['template', 'render'],
60-
'renderError'
67+
'renderError',
68+
'transition', // for Nuxt
69+
'loading', // for Nuxt
70+
'scrollToTop' // for Nuxt
6171
]
6272

6373
const groups = {

0 commit comments

Comments
 (0)