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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: disable multiword-rule #190

Merged
merged 5 commits into from Jan 5, 2022
Merged

chore: disable multiword-rule #190

merged 5 commits into from Jan 5, 2022

Conversation

manniL
Copy link
Member

@manniL manniL commented Dec 28, 2021

Not ideal for page components :(

Resolves #192
Better would be disabling it for the pages folder only I'd say 馃構

@manniL manniL requested a review from clarkdo December 28, 2021 16:11
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Could we implement via overrides instead (e.g. for **/pages/**), as you've linked to this?

Copy link

@iamarpitpatidar iamarpitpatidar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I think is better than just disabling it. as @danielroe said.

  rules: {
    'vue/multi-word-component-names': 'off',
  },
  overrides: [
    {
      files: ['components/*.{js,ts,vue}'],
      rules: {
        'vue/multi-word-component-names': 'error',
      }
    }
  ]

@manniL
Copy link
Member Author

manniL commented Jan 5, 2022

yeah, I think is better than just disabling it. as @danielroe said.

  rules: {
    'vue/multi-word-component-names': 'off',
  },
  overrides: [
    {
      files: ['components/*.{js,ts,vue}'],
      rules: {
        'vue/multi-word-component-names': 'error',
      }
    }
  ]

I'd probably do it the other way around, given that components could live in many folders but page components usually only in pages and layouts.

Copy link

@iamarpitpatidar iamarpitpatidar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay yeah that's smart..

@iamarpitpatidar
Copy link

@manniL can you check why test is failing tho ?

@clarkdo clarkdo merged commit 821057e into master Jan 5, 2022
@clarkdo clarkdo deleted the manniL-patch-1 branch January 5, 2022 10:37
@KareemDa
Copy link

KareemDa commented Feb 1, 2022

when this feature will be released?

installing latest version: 8.0.0 is still giving the same error

@rchl
Copy link

rchl commented Mar 19, 2022

It doesn't handle the case when page components are in test/fixture/... for example.
Also why does it apply to .js and .ts extensions? I would think that it should only apply to .vue?

@pi0
Copy link
Member

pi0 commented May 2, 2022

@rchl I suppose .js would be mostly useful for components with render function with // @vue/component however didn't try. It also makes sense to ignore **/pages/, project in subdir. Do you mind to check if **/pages also handles top level pages and make a PR?

@0x3333
Copy link

0x3333 commented Aug 12, 2022

In my case, I use an 'src' folder for all my components, assets, pages, etc. The lint kicks-in in this case.

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

Successfully merging this pull request may close these issues.

馃悰 eslint vue/multi-word-component-names naming limitation for routes
8 participants