Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.
Discussion options

You must be logged in to vote

格式化代码插件是Prettier
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
在学习手册第一课中有写过,另外注意安装完以后可能要做点配置。学习手册中也有,比如以下几个选项可能相关:

  "prettier.jsxSingleQuote": true,
  "prettier.packageManager": "npm",
  "prettier.singleQuote": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true,  //这个选项的意思就是,当我按ctrl+s保存的时候,它自动帮我格式化代码

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aspirantzhang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants