Vscode format error using prettier

clipboard.png

 
Mar.28,2021

this cannot format React jsx. Try another plug-in format
try


you should not have configured eslint,prettier format and failed the eslint format check. Set it to be formatted using eslint syntax in prettier. Refer to the following configuration

{
  "workbench.editor.enablePreview": false, //
  "search.followSymlinks": false, //rg.exe
  "editor.minimap.enabled": true, //
  "files.autoSave": "afterDelay", //
  "editor.quickSuggestions": {
    //
    "other": true,
    "comments": true,
    "strings": true
  },
  "editor.tabSize": 2, //eslint
  // "editor.formatOnSave": true, // eslint
  "prettier.singleQuote": true, //
  "prettier.eslintIntegration": true, // //prettiereslint
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true, //()
  "vetur.format.defaultFormatter.html": "js-beautify-html", //.vuehtml
  "vetur.format.defaultFormatter.js": "vscode-typescript", //vuejsts
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_attributes": "force-aligned" //
    }
  },
  "eslint.validate": [
    //.vue
    "javascript",
    "javascriptreact",
    // "html5",
    // "vue"
    {
      "language": "html",
      "autoFix": true
    },
    {
      "language": "vue",
      "autoFix": true
    }
  ],
  //  vscode  node_modules 
  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true,
    "**/node_modules": true,
    "**/package-lock.json": true
  },

  // python
  "python.pythonPath": "D:/python35/python.exe",
  "markdown.extension.preview.autoShowPreviewToSide": true,
  "eslint.autoFixOnSave": true,
  "sync.gist": "d592ea9cfb18d1552bccc8421e85fd15",
  "sync.quietSync": false,
  "sync.removeExtensions": true,
  "sync.syncExtensions": true,
  "sync.autoDownload": false,
  "sync.autoUpload": false,
  "sync.forceDownload": false,
  "workbench.iconTheme": "vscode-icons",
  "prettier.printWidth": 100,
}
Menu