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

stylistic format " to &quot #679

Open
7 tasks done
aizigao opened this issue Mar 6, 2025 · 1 comment
Open
7 tasks done

stylistic format " to &quot #679

aizigao opened this issue Mar 6, 2025 · 1 comment

Comments

@aizigao
Copy link

aizigao commented Mar 6, 2025

Describe the bug

version : "@antfu/eslint-config": "^4.5.1"

<script setup>
const test = ref(false)
</script>

<template>
  <div class='test && "good"'>
    test
  </div>
</template>

<style scoped>

</style>

tranform to

<script setup>
const test = ref(false)
</script>

<template>
  <div class="test && &quot;good&quot;"> <!-- wrong  -->
    test
  </div>
</template>

<style scoped>

</style>

Reproduction

https://github.com/aizigao/issue-eslint-config

System Info

System:
    OS: Linux 6.13 CatOS
    CPU: (16) x64 AMD Ryzen 7 PRO 6850H with Radeon Graphics
    Memory: 14.06 GB / 28.17 GB
    Container: Yes
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.18.3 - /run/user/1000/fnm_multishells/70569_1741242003943/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 10.8.2 - /run/user/1000/fnm_multishells/70569_1741242003943/bin/npm

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
@aizigao aizigao changed the title stylistic format && to &quot stylistic format " to &quot Mar 6, 2025
@aizigao
Copy link
Author

aizigao commented Mar 6, 2025

I found this problem cause by vue/html-quotes,when you config avoidEscape: true then could avoid it

eslint.config.js

 'vue/html-quotes': ['warn',"double" {
        avoidEscape: true,
      }],

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

1 participant