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

vue/multi-word-component-names also applies to pages directory #2434

Closed
2 tasks done
nopeless opened this issue Mar 21, 2024 · 2 comments
Closed
2 tasks done

vue/multi-word-component-names also applies to pages directory #2434

nopeless opened this issue Mar 21, 2024 · 2 comments

Comments

@nopeless
Copy link

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 8.57.0
  • eslint-plugin-vue version: 9.23.0
  • Vue version: 3.4.21
  • Node version: v20.11.1
  • Operating System: win11 23h2

Please show your full configuration:

module.exports = {
  // ...
  parser: "vue-eslint-parser",
  parserOptions: {
    parser: "@typescript-eslint/parser",
  },
  extends: [
    // "@nuxt/eslint-config",
    // "plugin:prettier/recommended",
    "plugin:vue/vue3-recommended",
  ],
  // ...
};

What did you do?

// index.vue
<template>
  <h1>hi</h1>
</template>

1:1 error Component name "index" should always be multi-word vue/multi-word-component-names

This should not trigger

Repository to reproduce this issue

https://stackblitz.com/edit/nuxt-starter-fvsxuf?file=.eslintrc.cjs

@waynzh
Copy link
Contributor

waynzh commented Mar 22, 2024

You mean in a Nuxt project, the pages directory should not be checked? You might want to refer to the nuxt/eslint config which disabled this rule.

Typically, this wouldn't be an issue as you can configure the ignores property to ignore certain component names in general project.

@FloEdelmann
Copy link
Member

Note that the Nuxt config only disables the rule in certain directories using overrides, which you can also do manually in your project. So I'll close this as won't fix, because there already exists a method to disable this rule for certain directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants