justin2018

vscode 保存时自动去掉无效引用 import

  •  
  •   justin2018 · Aug 28, 2022 · 2417 views
  •   You need to sign in to view this topic
    This topic created in 1533 days ago, the information mentioned may be changed or developed.

    打开settings.json,配置如下

    {
      "editor.codeActionsOnSave": {
        "source.organizeImports": true // false 为禁用,true 为启用
      }
    }
    

    3 replies  •  2022-08-28 10:04:41 +08:00
    ruolis
    ruolis
    Aug 28, 2022 via iPad
    1
    不去掉编译不通过吧
    horseInBlack
    horseInBlack
    Aug 28, 2022
    2
    @ruooooooli

    像 eslint 可以选择保存后检验或者提交时检验
    ruolis
    ruolis
    Aug 28, 2022 via iPad
    3
    @horseInBlack 学到了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   559 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 19:36 · PVG 03:36 · LAX 11:36 · JFK 14:36
    ♥ Do have faith in what you're doing.