justin2018

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

  •  
  •   justin2018 · Aug 28, 2022 · 2024 views
    This topic created in 1355 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
        1
    ruolis  
       Aug 28, 2022 via iPad
    不去掉编译不通过吧
    horseInBlack
        2
    horseInBlack  
       Aug 28, 2022
    @ruooooooli

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