Skip to content

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

@MuhammadM1998

Description

@MuhammadM1998

Environment

  • Operating System: Linux
  • Node Version: v18.18.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: pnpm@8.15.6
  • Builder: -
  • User Config: devtools, modules, components
  • Runtime Modules: @nuxt/eslint@0.3.10
  • Build Modules: -

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions