【问题标题】:what should I do when format tsconfig.json without change spaces and commas?在不更改空格和逗号的情况下格式化 tsconfig.json 时该怎么办?
【发布时间】:2022-12-09 08:36:18
【问题描述】:

我想在不更改空格和逗号的情况下格式化 tsconfig.json。 这个 tsc --init 配置 enter image description here

格式、空格和逗号更改后。 我应该怎么办? enter image description here

【问题讨论】:

    标签: json prettier-vscode


    【解决方案1】:

    逗号将放在那些多行 cmets 的末尾(/* ... */).所以你必须删除它们或将它们放在独立的行上。

    快速摆脱 Visual Studio Code 中的多行 cmets

    1. CTRL+H
    2. 勾选Use Regular Expression
    3. 粘贴s* /* .* */
    4. 点击Replace all

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-04
      • 2010-09-17
      • 1970-01-01
      • 2013-09-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多