簡體   English   中英

WebStorm和Angular樣式指南

[英]WebStorm and Angular Style Guide

有沒有一種方法可以將angular的樣式指南集成到WebStorm中?

特別是,自動導入使用雙引號代替單引號,並導入{Component}代替{Component},以及導出:[Component]代替[Component]。

每當我需要使用CTRL+Shift+L重新格式化我的代碼時,手動進行修復都非常煩人

  • Settings | Code Style | Typescript | Spaces Settings | Code Style | Typescript | Spaces Settings | Code Style | Typescript | Spaces ,啟用Within / ES6 import/export braces
  • Settings | Code Style | Typescript | Punctuation Settings | Code Style | Typescript | Punctuation Settings | Code Style | Typescript | Punctuation ,將Use設置為single

不確定如何解決導入問題,但是對於使用單引號,

首選項->編輯器->代碼樣式->打字稿->標點(選項卡)->第二行->在新代碼中使用單引號

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM