Visual studio code 漂亮的线断不接受规则

Visual studio code 漂亮的线断不接受规则,visual-studio-code,prettier,Visual Studio Code,Prettier,我试图用prettier更改换行符,但是vs code忽略我的设置。。。 我试着把行长度:140放进去,但什么也没发生 我试过了,但没有成功 // edit your tslint.json "max-line-length": [ true, { "limit": 140, "ignore-pattern": "^import |^export {(.*?)}" } ], 我用 prettier: [3.18.0] VS co

我试图用prettier更改换行符,但是vs code忽略我的设置。。。 我试着把
行长度:140
放进去,但什么也没发生

我试过了,但没有成功

// edit your tslint.json
"max-line-length": [
     true, 
    { 
        "limit": 140, 
        "ignore-pattern": "^import |^export {(.*?)}" 
    }
],
我用

prettier: [3.18.0]
VS code: 1.41.1
这是我的设置

{
  "workbench.editor.highlightModifiedTabs": true,
  "files.trimFinalNewlines": true,
  "window.menuBarVisibility": "default",
  "workbench.activityBar.visible": true,
  "files.autoSave": "off",
  "window.zoomLevel": 0,
  "editor.rulers": [
    140
  ],
  "editor.wordWrapColumn": 140,
  "[markdown]": {
    "editor.wordWrap": "wordWrapColumn",
    "editor.quickSuggestions": false
  },

  "diffEditor.ignoreTrimWhitespace": true,
  "vsicons.projectDetection.autoReload": true,
  "files.eol": "\n",
  "editor.formatOnSave": true,
  "editor.tabSize": 2,
  "javascript.referencesCodeLens.enabled": true,
  "cSpell.userWords": [
    "dropdown",
    "toastr"
  ],

  "typescript.updateImportsOnFileMove.enabled": "always",
  "terminal.integrated.rendererType": "dom",
  "html.format.wrapLineLength": 140,
  "editor.wordWrap": "bounded",
  "prettier.jsxBracketSameLine": true,
  "html.format.wrapAttributes": "preserve-aligned",
  "prettier.printWidth": 140
}
有没有其他方法可以让它工作,因为prettier总是以一种奇怪的方式格式化我的组件或html文件。。。 比方说, 这个

对此

languageLocale: [
        null,
        [Validators.minLength(1), Validators.maxLength(255)]
      ],
<mat-form-field>
        <input
               class="disabledInput"
               formControlName="id"
               matInput
               />
</mat-form-field>
或html

<mat-form-field>
        <input class="disabledInput" formControlName="id" matInput/>
</mat-form-field>

对此

languageLocale: [
        null,
        [Validators.minLength(1), Validators.maxLength(255)]
      ],
<mat-form-field>
        <input
               class="disabledInput"
               formControlName="id"
               matInput
               />
</mat-form-field>


如果我们有多个输入字段,读起来会很糟糕,因为需要将config设置为
package.json

这里提到