有些需要保持我的JS文件格式化为github repo和各国人民。 在一个文件中有这样的集团
```的html render(){ const {application,services,iWantTos,stage,actions,gameplan,dispatch} = this.props;
return (
<div className={styles.root}>
<div className={styles.hero}>
<img
alt="A staircase up to the next level of your startup."
src={`${imgPath}mobile-landingPage-staircase.png`}
srcSet={`
${imgPath}mobile-landingPage-staircase@2x.png 2x,
${imgPath}mobile-landingPage-staircase@3x.png 3x
`}
className={styles.heroImage}
/>
```
如您所见,第二条div
行未正确对齐。它应该是嵌套的,但它不是。我稍微修改了typescript格式化程序,但这没有用,有什么建议吗?
答案 0 :(得分:0)
感谢@ yuriy636我找到了解决方案:github.com/prettier/prettier支持JSX