Template Interpolation Issue - First letter not recognized in event variable assignment
See original GitHub issueInfo
- Platform: Win
- Vetur version: 0.21.0
- VS Code version: 1.35.0
Problem
When entering a data property into an event, it ignores the first letter and so persistently reports that the property does not exist. This error can be removed by surrounding the statement in curly brackets, but that creates a bigger Vue error.
Reproducible Case
Turn Template Interpolation Service on and write the following code:
<template>
<span @click="eg = true">Test</span>
</template>
<script>
export default {
data() {
return {
eg: false
}
}
}
</script>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:26 (14 by maintainers)
Top Results From Across the Web
Template literals (Template strings) - JavaScript | MDN
Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded ...
Read more >How can I do string interpolation in JavaScript? - Stack Overflow
I would love to be able to refer to variables inside strings, but in javascript you need to use concatenation (or some other...
Read more >Displaying values with interpolation - Angular
Interpolation refers to embedding expressions into marked up text. By default, interpolation uses the double curly braces {{ and }} as delimiters.
Read more >Understanding Template Literals in JavaScript - DigitalOcean
Template literals are a new form of making strings… ... Entire expressions can be interpolated, not just variables, such as in this example ......
Read more >Documentation - Template Literal Types - TypeScript
Generating mapping types which change properties via template literal strings. ... When a union is used in the interpolated position, the type is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem is related to the configured line endings. Switching VS Code to
LF
and it works as expected,CRLF
results in the error.Waiting for the upstream PR: https://github.com/mysticatea/vue-eslint-parser/pull/74