Open mbrocks1337 opened 1 month ago
Yeah, this is a limitation of eslint-plugin-vue
that hard-coded the support of defineComponent
- it's not Nuxt aware.
/cc @ota-meshi do you think it makes sense for eslint-plugin-vue
to support detecting defineNuxtComponent
? If so, do you think it needs to be configurable, or it's fine we just hard-coded and have it always on?
Yeah! We plan to do that in the next major version. But we don't have the time to work on a major version 😓 https://github.com/vuejs/eslint-plugin-vue/pull/2311
Environment
Build Modules: -
Package
@nuxt/eslint
Reproduction
https://stackblitz.com/edit/github-h9xb1n?file=components%2FComponentWithNuxtComponent.vue,components%2FComponentWithComponent.vue,app.vue,package.json
run "npm run lint"
Describe the bug
Using the Options API with the vue wrapper defineComponent gives you an eslint error: "ESLint: Unexpected side effect in "bar" computed property.(vue/no-side-effects-in-computed-properties)"
Consuming the same component with defineNuxtComponent disables this feature completly
Additional context
No response
Logs
No response