简体   繁体   English

在 WebStorm 中,如何在 React 中禁用道具缩进?

[英]In WebStorm, how do I disable props indentation in React?

In WebStorm, by default indentation for React functional component props is to align it with the opening curly brace.在 WebStorm 中,默认情况下 React 功能组件 props 的缩进是与左花括号对齐。

export default function TableSeater({
                                    sectionsLookup, tableSelectionList
}: IProps) {

How can I make it align normally by default, like this?我怎样才能让它默认正常对齐,像这样?

export default function TableSeater({
  sectionsLookup, tableSelectionList
}: IProps) {

Try disabling Align when multiline for Function declaration parameters in Settings |尝试在设置 | 中禁用 Function 声明参数的多行时对齐Editor |编辑 | Code Style |代码风格 | TypeScript | TypeScript | Wrapping and Braces: Screenshot包装和大括号:屏幕截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM