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/no-useless-mustaches auto-fix produces invalid HTML #2384

Closed
2 tasks done
claneo opened this issue Jan 30, 2024 · 0 comments · Fixed by #2389
Closed
2 tasks done

vue/no-useless-mustaches auto-fix produces invalid HTML #2384

claneo opened this issue Jan 30, 2024 · 0 comments · Fixed by #2389

Comments

@claneo
Copy link
Contributor

claneo commented Jan 30, 2024

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.56.0
  • eslint-plugin-vue version: 9.20.1
  • Vue version:
  • Node version:
  • Operating System:

Please show your full configuration:

module.exports = {
    extends: ['plugin:vue/recommended'],
    rules: {
        'vue/no-useless-mustaches': 'error',
    },
};

What did you do?

<template>
    <span>{{ '<' }}</span>
</template>

What did you expect to happen?

Don't report error

Or auto fix to html entities

<template>
    <span>&lt;</span>
</template>

What actually happened?

<template>
  <span><</span>
  <!--  ^ Invalid -->
</template>

Repository to reproduce this issue

Playground

@FloEdelmann FloEdelmann changed the title no-useless-mustaches should ignore or escape string contains invalid html charactor vue/no-useless-mustaches auto-fix produces invalid HTML Jan 31, 2024
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.

2 participants