Skip to content

Not escaped ampersand used in attribute/prop creates errors in next lines #157

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
krystian-wolarek opened this issue Jun 21, 2022 · 1 comment · Fixed by #158
Closed

Comments

@krystian-wolarek
Copy link

Tell us about your environment

  • ESLint version: 8.18.0
  • eslint-plugin-vue version: 9.1.1
  • Node version: 4.16.0
  • Operating System: macOS Monterey 12.3

Please show your full configuration:
Clean Vue project with 1 additional rule

"rules": {
      "vue/max-attributes-per-line": [
        "error",
        {
          "singleline": {
            "max": 1
          },
          "multiline": {
            "max": 1
          }
        }
      ]
    }

What did you do?

When we place any attribute ( prop or normal html attribute) that ends with & like in example bellow then eslint complains in next line about errors that not exist. See What actually happened?

When i add any letter after ampersand or escape it manually it working fine. See What did you expect to happen?

<some-component
    separator="&"
    any-attribute="Vue logo"
    class="anything" />

What did you expect to happen?
Zrzut ekranu 2022-06-21 o 14 28 20

What actually happened?
Zrzut ekranu 2022-06-21 o 14 27 28

Repository to reproduce this issue

https://codesandbox.io/s/vigilant-chihiro-e3s7xz?file=/src/App.vue

@ota-meshi ota-meshi transferred this issue from vuejs/eslint-plugin-vue Jun 23, 2022
@ota-meshi
Copy link
Member

Thank you for posting issue!

I have fixed this issue. Try using the latest version of vue-eslint-parser.

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

Successfully merging a pull request may close this issue.

2 participants