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

conflict with vue/html-self-closing #85

Closed
aldarund opened this issue Mar 9, 2019 · 4 comments
Closed

conflict with vue/html-self-closing #85

aldarund opened this issue Mar 9, 2019 · 4 comments

Comments

@aldarund
Copy link

aldarund commented Mar 9, 2019

  extends: [
    '@nuxtjs',
    'plugin:nuxt/recommended',
    'plugin:prettier/recommended',
    'prettier',
    'prettier/vue',
  ],
  plugins: [
    'prettier'
  ],

It will lead to problem with for example img tags

Thats how prettier wants it
<img src="~assets/img/lemken_icon.png" alt="L" />
Thats how vue eslint wants it
<img src="~assets/img/lemken_icon.png" alt="L">

eslint-config-prettier-check also dont report this rule as a problem

related prettier issue prettier/prettier#5246

@lydell
Copy link
Member

lydell commented Mar 9, 2019

Hi!

vue/html-self-closing is already disabled:

"vue/html-self-closing": 0,

Could you make a reproduction repo, where I can run npm it to reproduce?

@aldarund
Copy link
Author

aldarund commented Mar 9, 2019

Hmmm, i cant reproduce it now... My only guess that there was some weird caching issue..
Closing for now

@aldarund aldarund closed this as completed Mar 9, 2019
@cmygray
Copy link

cmygray commented Mar 25, 2019

I have the same issue. Every <br> tag is fixed to self-closing tag.

https://gist.github.com/cmygray/f968f44c28832c1513679c688bd2fef0

@lydell
Copy link
Member

lydell commented Mar 25, 2019

@cmygray Prettier formats all void elements with a slash (<br />), yes. That's why the vue/html-self-closing rule conflicts/is redundant with Prettier. So eslint-config-prettier turns it off. However, you have turned it on again in your config. Remove the rule and your conflicts should go away.

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