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

Consider adding a policy about not supporting Nuxt. (In conclusion, we will continue to support Nuxt.) #2058

Closed
ota-meshi opened this issue Dec 6, 2022 · 12 comments

Comments

@ota-meshi
Copy link
Member

I think we have been trying to support Nuxt as much as possible, but nuxt3 adds many unique features, so it seems that it is almost incompatible with eslint-plugin-vue.
Nuxt support should be left to eslint-plugin-nuxt and eslint-plugin-vue should consider whether it should focus on supporting vue core features.
https://github.com/nuxt/eslint-plugin-nuxt

@ota-meshi
Copy link
Member Author

@FloEdelmann I would love to hear your opinion. Could you please comment when you have time?

@danielroe
Copy link
Member

I will be watching with interest. I am very happy to support (e.g. maintain/contribute as you would value) this plugin from the Nuxt side if you would like to consolidate effort, where possible.

@ota-meshi
Copy link
Member Author

Thank you for your comment. Whether this plugin supports Nuxt or leaves it to eslint-plugin-nuxt, we need help from the Nuxt team 😃
I don't use Nuxt, but @FloEdelmann has already done a lot of work to make this plugin support Nuxt's features.
I'm worried that if we continue to support Nuxt with only the current maintainers, we'll be asking Flo to do a lot of work again.

@ota-meshi ota-meshi pinned this issue Dec 7, 2022
@ota-meshi
Copy link
Member Author

Currently the relevant issues are #2057 and #1969.

@vedmant
Copy link

vedmant commented Dec 11, 2022

For me personally since I use options API, just making it support defineNuxtComponent() function the same as defineComponent() will be very helpful (#2057)

@ota-meshi
Copy link
Member Author

Yeah, but supporting it in the same way as defineComponent is a breaking change. I'm not sure if the major version of this plugin should be bumped for Nuxt at the moment.

@ota-meshi
Copy link
Member Author

My current idea for defineNuxtComponent is to provide a way to specify the Vue options object from eslint-plugin-vue in settings etc. and use it from eslint-plugin-nuxt to extend it for Nuxt.
This does not require breaking changes for eslint-plugin-vue. Therefore, I think it is the fastest way for Nuxt users to be able to use ESLint without problems.
But doing this means that eslint-plugin-vue will stop supporting Nuxt and leave it to eslint-plugin-nuxt.
We need to consult with the eslint-plugin-nuxt maintainers about extension points like I mentioned earlier. This requires help from the Nuxt team.

@vedmant
Copy link

vedmant commented Dec 11, 2022

@ota-meshi

My current idea for defineNuxtComponent is to provide a way to specify the Vue options object from eslint-plugin-vue in settings etc. and use it from eslint-plugin-nuxt to extend it for Nuxt.

That makes a lot of sense, and allow to use multiple options, to use defineComponent and defineNuxtComponent in the same time.

@FloEdelmann
Copy link
Member

Why would treating defineNuxtComponent the same as defineComponent be a breaking change?

My opinion on the whole topic: I think we should try to support Nuxt features that are working similarly to Vue core features. IMO, that includes both #2057 and #1969.

We could introduce a per-rule or shared settings that should be considered "Vue". E.g.:

{
    "settings": {
        "vuePackageNames": ["vue", "@vue/composition-api", "#imports"]
    }
}

So importing ref from one of those packages would be tracked, importing ref from some other package would not. The default settings could either include or exclude Nuxt packages. And we could allow a special value (e.g. *) to track all refs, regardless from where they were imported, to support auto-imports.

@ota-meshi
Copy link
Member Author

ota-meshi commented Dec 12, 2022

Thank you for your comment!

Why would treating defineNuxtComponent the same as defineComponent be a breaking change?

I think it's a breaking change at the core of this plugin. I think it will generate quite a lot of errors and users will have to do a lot of migration work. Do you think I worry too much?

My opinion on the whole topic: I think we should try to support Nuxt features that are working similarly to Vue core features.

Thank you for your opinion. So let us try to make eslint-plugin-vue support Nuxt3 features.

We could introduce a per-rule or [shared settings]

I still can't decide if that makes sense. Because I still don't understand which APIs auto-import can auto import and which ones it can't 😓. If you know the location of the documentation that lists APIs that can be auto-imported, please let me know.

@FloEdelmann
Copy link
Member

Maybe we should clarify in the docs that a new minor (or even patch) version of eslint-plugin-vue could result in more reported lint issues. And that this is the case especially for users of Nuxt and other third-party frameworks built on top of Vue.

@vedmant
Copy link

vedmant commented Jan 2, 2023

All my Vue projects are actually based on Nuxt, and not supporting Nuxt for me will make this plugin basically pointless.

@ota-meshi ota-meshi changed the title Consider adding a policy about not supporting Nuxt. Consider adding a policy about not supporting Nuxt. (In conclusion, we will continue to support Nuxt.) Mar 23, 2023
@ota-meshi ota-meshi unpinned this issue May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants