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

Some stylistic rules of eslint-plugin-vue are not disabled by default #348

Closed
kingyue737 opened this issue Mar 21, 2024 · 0 comments · Fixed by #349
Closed

Some stylistic rules of eslint-plugin-vue are not disabled by default #348

kingyue737 opened this issue Mar 21, 2024 · 0 comments · Fixed by #349

Comments

@kingyue737
Copy link
Contributor

Environment


  • Operating System: Windows_NT
  • Node Version: v20.11.1
  • Nuxt Version: 3.11.1
  • CLI Version: 3.11.0
  • Nitro Version: 2.9.4
  • Package Manager: pnpm@8.15.4
  • Builder: -
  • User Config: devtools
  • Runtime Modules: @nuxt/eslint@0.3.0-beta.2
  • Build Modules: -

Package

None

Reproduction

🤔In my opinion, the problem is obvious without repro.

Describe the bug

I ran ESLint with the latest @nuxt/eslint on my local repo formatted by prettier, it stills throws some warnings:

D:\Solutions\vitify-nuxt\components\App\AppDrawer.vue
  60:24  warning  Expected no line breaks before closing bracket, but 1 line break found  vue/html-closing-bracket-newline
  67:23  warning  Expected no line breaks before closing bracket, but 1 line break found  vue/html-closing-bracket-newline

D:\Solutions\vitify-nuxt\components\App\AppSettings.vue
  47:31  warning  Expected 1 line break after opening tag (`<v-label>`), but no line breaks found    vue/singleline-html-element-content-newline

I checked the rules listed by eslint-config-vue, there are some other stylistic rules need to be disabled (commented by "included in recommended"):

{
    "vue/array-bracket-newline": "off",
    "vue/array-bracket-spacing": "off",
    "vue/array-element-newline": "off",
    "vue/arrow-spacing": "off",
    "vue/block-spacing": "off",
    "vue/block-tag-newline": "off",
    "vue/brace-style": "off",
    "vue/comma-dangle": "off",
    "vue/comma-spacing": "off",
    "vue/comma-style": "off",
    "vue/dot-location": "off",
    "vue/func-call-spacing": "off",
    "vue/html-closing-bracket-newline": "off",  // included in `recommended`
    "vue/html-closing-bracket-spacing": "off",  // included in `recommended`
    "vue/html-end-tags": "off",  // included in `recommended`
    "vue/html-indent": "off",      // already disabled by @nuxt/eslint
    "vue/html-quotes": "off",     // already disabled by @nuxt/eslint
    "vue/key-spacing": "off",
    "vue/keyword-spacing": "off",
    "vue/max-attributes-per-line": "off",  // already disabled by @nuxt/eslint
    "vue/multiline-html-element-content-newline": "off",  // already disabled by @nuxt/eslint
    "vue/multiline-ternary": "off",
    "vue/mustache-interpolation-spacing": "off",  // included in `recommended`
    "vue/no-extra-parens": "off",
    "vue/no-multi-spaces": "off",  // already disabled by @nuxt/eslint
    "vue/no-spaces-around-equal-signs-in-attribute": "off",  // already disabled by @nuxt/eslint
    "vue/object-curly-newline": "off",
    "vue/object-curly-spacing": "off",
    "vue/object-property-newline": "off",
    "vue/operator-linebreak": "off",
    "vue/quote-props": "off",
    "vue/script-indent": "off",
    "vue/singleline-html-element-content-newline": "off",  // included in `recommended`
    "vue/space-in-parens": "off",
    "vue/space-infix-ops": "off",
    "vue/space-unary-ops": "off",
    "vue/template-curly-spacing": "off",
}

Maybe we can also disable these 5 rules included by vue/recommended by default?

Additional context

No response

Logs

No response

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

Successfully merging a pull request may close this issue.

1 participant