关于VSC编辑问题的Eslint ...... [英] Eslint on VSC editor problem...
本文介绍了关于VSC编辑问题的Eslint ......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Eslint规则说使用单引号但在自动保存时它会将其更正为双引号,然后出现错误....
我跟着Eslint规则在https://eslint.org/docs/rules/quotes上,但自动保存功能拒绝接受这个...这也是额外的半空间和间距
正确代码:
< script>
export default {
name:'Homepage',
data(){
return {
msg:'Olympian'
}
}
}
< / script>
保存时会发生这种情况:
< script>
export default {
name:Homepage,
data(){
return {
msg:Olympian
};
}
};
< / script>
我尝试过:
我已尝试配置用户设置但没有avial
解决方案
从这里开始:
即使指定了prettier.singleQuote:true,单引号有时会被双引号替换·问题#2338·更漂亮/更漂亮·GitHub [ ^
Eslint rules says use single quotes but upon autosave it corrects this to double quotes which then comes up as an error....
I've followed the Eslint rules on https://eslint.org/docs/rules/quotes but the autosave function refuses to accept this... this also goes for extra semi and spacing
Correct code:
<script> export default { name: 'Homepage', data () { return { msg: 'Olympian' } } } </script>
When saving this happens:
<script> export default { name: "Homepage", data() { return { msg: "Olympian" }; } }; </script>
What I have tried:
I've tried configuring the User settings but no avial
解决方案
Start here:
Single quotes are sometimes replaced with double quotes even when "prettier.singleQuote: true" is specified · Issue #2338 · prettier/prettier · GitHub[^]
这篇关于关于VSC编辑问题的Eslint ......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文