當我在 IntelliJ Idea 中使用 Reformat File 時,IDE 在函式引數中添加了額外的空間,以將其與函式對齊。
我在代碼樣式中找不到禁用更改配置的選項。
代碼:
export const getApplicationFormInstance = ({
consents,
dealer_code,
source,
rent_subscription,
comment = null,
...baseOptions
}: IApplicationFormOptions): FormInstanceType<IApplicationModel> => {
return false;
}
ESLint 的錯誤截圖:

我試圖找到在 IDE 中修復它的方法,而不是在 ESLint 中,例如:
"@typescript-eslint/indent": "off"
uj5u.com熱心網友回復:
- 選擇要以不同格式設定的代碼。
- 輸入Alt Enter并呼叫
Adjust code style settings - 在
Wrapping and Braces選項卡下取消選中Align when multiline復選框
這應該讓你得到你想要的格式化程式行為。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/505777.html
