我不知道这是否是 VS Code 的默认行为,(我在默认值之上有很多自定义配置)
但是当我格式化代码时,它会转换这样的代码:
const simpleInput = (
<Input
{...input}
{...others}
state={state}
/>
);
进入 :
const simpleInput = (
<Input
{...input}
{...others}
state={state}
/> <- Here is the difference
);
我的 es-lint 会发出警告[eslint] The closing bracket must be aligned with the line containing the opening tag (expected column 5) (react/jsx-closing-bracket-location)
如何调整它以使其与标签开始正确对齐?
请注意,该文件在 .js 文件中使用,我相应JSX
地配置了 VS 代码。