question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parsing error: invalid-first-character-of-tag-name.

See original GitHub issue

Tell us about your environment

  • ESLint Version: 3.19.0
  • eslint-plugin-vue Version:
  • Node Version: 8.9.0

Please show your full configuration:

I am using standard library.

What did you do? Please include the actual source code causing the issue.

<div class="value">
  <pre class="element">{{ `<${item.element.tagName} ${item.element.attributes.map(attr => attr.key + '="' + attr.value + '"').join(' ')} />` }}</pre>
</div>

What did you expect to happen?

No need to throw eslint error.

What actually happened? Please include the actual, raw output from ESLint.

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
mysticateacommented, Jul 20, 2018

Hi. I apologize for the delay.

This is intentional behavior. This is the same issue as #370.

In Vue.js, the inside of mustache is also HTML text. So HTML parser reports the invalid-first-character-of-tag-name error on the “anything else” step of 12.2.5.6 Tag open state.

The < character in mustache can cause a certain surprising behavior, I’d like to recommend the use of computed properties or just &lt;.

Thank you.

0reactions
jasonxia23commented, Jul 22, 2018

Thanks for figure it out

Read more comments on GitHub >

github_iconTop Results From Across the Web

invalid-first-character-of-tag-name` in expression. · Issue #370 ...
It can be fixed by add "vue/no-parsing-error": [2, { "invalid-first-character-of-tag-name": false }]" in .eslintrc.js . However, I hope a better ...
Read more >
invalid-first-character-of-tag-name.eslint (vue/no-parsing-error ...
In my case by adding the following under the rules of .eslintrc.js worked: "vue/no-parsing-error": [ "error", { "invalid-first-character-of-tag-name": false ...
Read more >
Parsing error: Invalid first character of tag name on ... - Issuehunt
I have searched through existing issues · I have read through docs · I have read FAQ · I have tried restarting VS...
Read more >
invalid-first-character-of-tag-name.eslint (vue/no-parsing-error ...
Coding example for the question How to fix Parsing error: invalid-first-character-of-tag-name.eslint (vue/no-parsing-error) in Vue-Vue.js.
Read more >
vue/no-parsing-error
disallow parsing errors in ` ` ... This rule reports syntax errors in <template> . ... "invalid-first-character-of-tag-name": true, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found