微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

代码格式化程序“无法格式化”JavaScript 文件

如何解决代码格式化程序“无法格式化”JavaScript 文件

我正在使用 Macbook,突然我在 VSCode 中的 Prettier 不起作用,并在底部栏中显示如下消息:

enter image description here

这是我的 settings.json 文件

   "editor.formatOnSave": true,"workbench.colorTheme": "Material Theme Darker","workbench.iconTheme": "material-icon-theme","editor.fontSize": 13,"[json]": {
       "editor.quickSuggestions": {
           "strings": true
       },"editor.suggest.insertMode": "replace"
   },"terminal.integrated.automationShell.osx": "","terminal.integrated.shell.osx": "","terminal.integrated.fontFamily": "\"Meslo LG M for Powerline\"","editor.defaultFormatter": "esbenp.prettier-vscode","[javascript]": {
       "editor.defaultFormatter": "esbenp.prettier-vscode"
   },"prettier.enableDebugLogs": true
     
} 

同样在右下角,它显示了 Prettier 的勾号:

enter image description here

有人可以帮我修复它吗,我一直在尝试卸载并重新安装 Prettier 或 VScode,但它仍然显示相同的错误消息。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。