【求助】自动修复符号问题如何关闭?疑似Prettier插件问题

成功run build某Vue项目后,自动修复了项目中所有文件存在的中英文符号混用问题,导致多个文件被Commit,如果关闭自动修复?
使用的是VS Code,格式化插件是Prettier

.prettierrc
{
  "singleQuote": true,
  "trailingComma": "all"
}
.prettierrc.js
module.exports = {
  trailingComma: 'es5',
  tabWidth: 2,
  semi: false,
  singleQuote: true,
  endOfLine: 'lf',
}
用户配置文件
{
  "workbench.colorTheme": "Default Light Modern",
  "workbench.iconTheme": "material-icon-theme",
  "liveServer.settings.donotVerifyTags": true,
  "files.autoSave": "afterDelay",
  "workbench.editorAssociations": {
    "*.exe": "default",
    "*.sql": "default"
  },
  "window.commandCenter": true,
  "launch": {
    "configurations": []
  },

  "security.workspace.trust.untrustedFiles": "open",
  "git.defaultCloneDirectory": "",
  "git.path": "D:/Software/Git/bin/git.exe",
  "python.defaultInterpreterPath": "D:/Software/Python/python.exe",
  "files.exclude": {
    ".history": true
  },
  "livePreview.notifyOnOpenLooseFile": false,
  "code-runner.runInTerminal": true,
  "explorer.confirmDragAndDrop": false,
  "php.suggest.basic": false,
  "php.validate.enable": false,
  "emmet.excludeLanguages": ["markdown", "php"],
  "debug.javascript.pickAndAttachOptions": {},
  "workbench.startupEditor": "none",
  "eslint.validate": [
    "vue",
    "javascript",
    "typescript",
    "typescriptreact",
    "html"
  ],
  "files.associations": {
    "*.c": "c",
    "*.java": "java",
    "*.py": "python",
    "*.json": "json",
    "*.js": "javascript",
    "*.ts": "typescript",
    "*.vue": "vue"
  },

  "files.autoGuessEncoding": true,

  "java.compile.nullAnalysis.nonnull": [
    "javax.annotation.Nonnull",
    "org.eclipse.jdt.annotation.NonNull",
    "org.springframework.lang.NonNull"
  ],
  "java.jdt.ls.java.home": "D:/Program Files/Java/jdk-19",
  "java.configuration.runtimes": [],
  "java.project.referencedLibraries": [
    "D:\\eclipse\\exercises\\LuckyStudent\\lib\\gson-2.8.5.jar"
  ],

  "python.autoComplete.extraPaths": [],
  "python.analysis.extraPaths": [],
  "files.hotExit": "off",

  "emmet.extensionsPath": [
    "D:\\Software\\Microsoft VS Code\\resources\\app\\extensions",
    "C:\\Users\\yanyao\\.vscode\\extensions"
  ],
  "workbench.editor.empty.hint": "hidden",
  "remote.extensionKind": {
    "pub.name": ["ui"]
  },
  "git.enableSmartCommit": true,
  "git.confirmSync": false,
  "github.copilot.editor.enableAutoCompletions": true,
  "explorer.confirmDelete": false,
  "typescript.updateImportsOnFileMove.enabled": "always",
  "tabnine.experimentalAutoImports": true,

  // editor
  "editor.fontSize": 17, //编辑器字体大小
  "editor.defaultFormatter": "esbenp.prettier-vscode", //编辑器格式化工具
  "editor.insertSpaces": true,
  "editor.lineNumbers": "on", //开启行数提示
  "editor.quickSuggestions": {
    //开启自动显示建议
    "other": true,
    "comments": true,
    "strings": true
  },
  "editor.tabSize": 4,

  "editor.accessibilitySupport": "off",
  "editor.formatOnSave": true,
  "editor.unicodeHighlight.ambiguousCharacters": false,
  "editor.minimap.enabled": false,
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[c]": {
    "editor.wordBasedSuggestions": "off",
    "editor.suggest.insertMode": "replace",
    "editor.semanticHighlighting.enabled": true,
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[python]": {
    "editor.defaultFormatter": "charliermarsh.ruff"
  },
  "[java]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "[html]": {
    "editor.defaultFormatter": "vscode.html-language-features"
  },
  "editor.detectIndentation": false
}
2 个赞

应该贴prettier配置吧

好滴,我不知道有这个配置 :smiling_face_with_tear:

【Copilot回答】 在.prettier.js中添加eslintIntegration: false,不知道行不行。

From 快问快答 to 开发调优