As a beginner in vue3, I am venturing into building some side projects. However, I keep encountering an error message stating ';' expected.Vetur(1005) when attempting to utilize the computed function. Strangely enough, sometimes the same syntax works perfectly fine in other files. After conducting some research, I have already attempted disabling the vetur experimental option and reopening VS Code, but unfortunately, that did not resolve the issue.
“vetur.experimental.templateInterpolationService”: false
https://i.sstatic.net/qPUaG.png
<script>
// eslint-disable-next-line no-unused-vars
import marked from "marked";
export default {
data() {
return {
text: "",
};
},
computed(){
// (){ will have missed ";" error
markedText(){
return marked(this.text);
}
}
};
</script>