Skip to content

empty multiline-html-element-content-newline & singleline-html-element-content-newline #682

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

Closed
armano2 opened this issue Nov 26, 2018 · 2 comments

Comments

@armano2
Copy link
Contributor

armano2 commented Nov 26, 2018

Tell us about your environment

  • ESLint version: 5.9.0
  • eslint-plugin-vue version: 5.0.0-beta.5
  • Node version: 8.12.0

Please show your full configuration:

{
  "extends": {
    "plugin:vue/strongly-recommended"
  }
}

What did you do?

multiline-html-element-content-newline

<div
  class="a"
  v-if="b"
  @click.stop.prevent
></div>

singleline-html-element-content-newline

<slot name="header"></slot>

What did you expect to happen?

When component has no content this rule should not enforce putting new line.

What actually happened?

 Expected 1 line break after opening tag (`<div>`), but no line breaks found
 Expected 1 line break after opening tag (`<div>`), but no line breaks found
@armano2
Copy link
Contributor Author

armano2 commented Nov 26, 2018

I'm unsure if this should be option or defaul behavior, but its common to use <slot name="title"></slot> without content

@michalsnik
Copy link
Member

I agree, this makes sense and it shouldn't report if there is no content inside.

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

No branches or pull requests

3 participants