1.ESLint 拡張機能をインストールする
2. 構成
ファイル----設定----設定
、または左下隅にある [設定] を直接クリックし
、
[コンテンツの構成]をクリックします。
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}, //让prettier使用eslint的代码格式进行校验
"editor.formatOnType": true,
"editor.formatOnSave": true,
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},