【问题标题】:WebStorm is not breaking long linesWebStorm 没有打破长线
【发布时间】:2020-07-19 05:20:09
【问题描述】:

我目前正在使用 WebStorm 2019.3.4 并且在 Angular 项目中,尝试按 CTRL + ALT + L 重新格式化代码时,我无法中断长行。

我有 IDE 和 TypeScript 的默认配置。

我想打破的长线示例:

export const countyList = [{
   countyName: 'Alachua',
   taxRate: '0.01',
   zipCodeList: ['32601', '32602', '32603', '32604', '32605', '32606', '32607', '32608', '32609', '32610', '32611', '32612', '32613', '32614', '32615', '32616', '32618', '32627', '32631', '32635', '32641', '32643', '32653', '32654', '32655', '32658', '32662', '32667', '32669', '32694']
}];

【问题讨论】:

    标签: typescript intellij-idea ide webstorm


    【解决方案1】:

    数组的默认格式化行为是不包装它们。您可以使用这组选项自行配置:

    【讨论】:

    • 美丽。非常感谢。
    猜你喜欢
    • 2011-02-23
    • 2023-03-11
    • 2011-01-04
    • 1970-01-01
    • 1970-01-01
    • 2013-10-12
    • 1970-01-01
    • 2014-04-15
    • 1970-01-01
    相关资源
    最近更新 更多