【问题标题】:WebStorm and Angular Style GuideWebStorm 和 Angular 风格指南
【发布时间】:2017-07-21 14:53:53
【问题描述】:

有没有办法将 Angular 的样式指南集成到 WebStorm 中?

特别是,自动导入使用双引号而不是单引号,导入 {Component} 而不是 { Component },以及 export: [Component] 而不是 [ Component ]。

每次我需要用CTRL+Shift+L重新格式化我的代码时,手动修复这真的很烦人

【问题讨论】:

    标签: angularjs angular webstorm


    【解决方案1】:
    • Settings | Code Style | Typescript | Spaces,启用Within / ES6 import/export braces
    • Settings | Code Style | Typescript | Punctuation中,设置使用 单身

    【讨论】:

      【解决方案2】:

      不确定如何解决导入问题,但是对于使用单引号,

      Preferences --> Editor --> Code Style --> Typescript --> Punctuation(tab) --> 第二行 --> 在新代码中使用单引号

      【讨论】:

      猜你喜欢
      • 2014-06-08
      • 2018-01-09
      • 1970-01-01
      • 1970-01-01
      • 2017-11-26
      • 2011-01-13
      • 2011-07-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多