Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add nuxt component functions to order rule #786

Merged
merged 1 commit into from Feb 3, 2019
Merged

feat: add nuxt component functions to order rule #786

merged 1 commit into from Feb 3, 2019

Conversation

manniL
Copy link
Contributor

@manniL manniL commented Jan 24, 2019

No description provided.

@manniL manniL changed the title chore: add nuxt component functions to order rule feat: add nuxt component functions to order rule Jan 24, 2019
Copy link
Member

@michalsnik michalsnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @manniL . I was thinking whether we shouldn't create dedicated config for nuxt and set it there:

module.exports = {
  extends: ['eslint:recommended', 'nuxt/recommended']
}

but since there won't be too many differences for now, I'm also ok with having it as part of the default config.

@manniL
Copy link
Contributor Author

manniL commented Jan 29, 2019

@michalsnik We are currently working on a few rules for Nuxt here ☺️
But of course, duplicating logic, or rules, isn't the goal, so I thought it'd fit better in the Vue plugin as it'll be part of the recommended Nuxt eslint config anyway 🙊

@michalsnik michalsnik merged commit 5d1f051 into vuejs:master Feb 3, 2019
@manniL manniL deleted the patch-2 branch February 3, 2019 12:03
@rchl
Copy link
Contributor

rchl commented Feb 14, 2019

I really don't like the order picked for asyncData (same for fetch probably although I'm not using it).

These are called before component is initialized and before data is created so I would expect the order to be:
...
props
asyncData
fetch
data
...
That would match the order of things getting merged together (first asyncData/fetch, then data).

@manniL
Copy link
Contributor Author

manniL commented Feb 18, 2019

@rchl I think the preferred order is always debatable 🙈

These are called before component is initialized and before data is created

For now yes. With ssrPrefetch from v2.6 this will change. You will have this access in asyncData. We just have to get the changes from our side done.

That would match the order of things getting merged together (first asyncData/fetch, then data
fetch is not related to data, only asyncData will finally merge with data. But I see the point there.

Feel free to submit a PR and we can talk about it there in-depth ☺️

@rchl
Copy link
Contributor

rchl commented Feb 18, 2019

Created #823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants