nuxt / eslint

Collection of ESLint-related packages for Nuxt
https://eslint.nuxt.com
MIT License
515 stars 65 forks source link

False positives for `vue/multi-word-component-names` rule #419

Closed MuhammadM1998 closed 1 month ago

MuhammadM1998 commented 2 months ago

Environment

Package

@nuxt/eslint

Reproduction

https://stackblitz.com/edit/nuxt-starter-yrjfcn?file=app.vue

Describe the bug

When setting a prefix to components folder such as follows

export default defineNuxtConfig({
  modules: ['@nuxt/eslint'],
  components: [{ path: '/components', prefix: 'Prefix' }],
})

Root components can be a single word as they would prefixed anyway making them at least two words which follows Vue's convention.

However I get the error Component name "A" should always be multi-word with root component and also nested components in a folder (e.g. components/Nested/A.vue)

In the reproduction link, running pnpm lint in the terminal gives the same result as the below screenshot

image

Additional context

No response

Logs

No response