eslint-plugin-vue icon indicating copy to clipboard operation
eslint-plugin-vue copied to clipboard

Fix detect Nuxt3 defineNuxtComponent

Open sugitata opened this issue 1 year ago • 2 comments

  • fixes #2191
  • fixes #2057

Description

It's just a workaround like solution. Add the defineNuxtComponent alias for Nuxt3 projects, similar to https://github.com/vuejs/eslint-plugin-vue/pull/1088.

About defineNuxtComponent

The difference between defineNuxtComponent and defineComponent is only asyncData and head options are added on defineNuxtComponent. These options are not essential to check in vue-eslint-plugin, so it should be fine to treat it as defineComponent.

https://nuxt.com/docs/api/utils/define-nuxt-component

sugitata avatar Nov 13 '23 03:11 sugitata

@FloEdelmann Thank you for your review! I fixed them.

sugitata avatar Nov 14 '23 11:11 sugitata

Should we consider this a breaking change and keep this for v10?

Yeah. I think this should be included in v10.

ota-meshi avatar Nov 29 '23 05:11 ota-meshi