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

时间:2021-03-15 06:58:07

标签: visual-studio-code prettier prettier-vscode jsprettier

我正在使用 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,但它仍然显示相同的错误消息。

0 个答案:

没有答案