0

我一直在使用VSCodeBeautify來清理一些TypeScript文件,對於大多數情況下,除了導入和導出外,它都能很好地工作。使用Beautify.js在VSCode中導入和導出行間距

上保存

import { 
    AccountsModel 
} from '../models/accounts'; 

期望的行爲

import { AccountsModel } from '../models/accounts'; 

我試圖創建一個.jsbeautifyrc文件中的項目的根,但它似乎並沒有被得到拾起當前行爲。

{ 
    "preserve_newlines": true, 
    "max_preserve_newlines": 2 
} 

回答

0

這就是我最終使用的。

{ 
    "brace_style": "collapse-preserve-inline" 
} 

很好用!