I found that prettier will wrap my jsx attributes which has more than one template literal to new line.
For examples in my jsx file:
// before formatted and expected result
<DemoFrame html={`${demoPath}/frame1/index.html`} css={`${demoPath}/frame1/index.min.css`} />
// formatted
<DemoFrame
html={`${demoPath}/frame1/index.html`}
css={`
${demoPath}/frame1/index.min.css
`}
/>
But these were not changed
<CodeChunk path={`${demoPath}/frame1/index.html`} lang="html" />
<DemoFrame html={`${demoPath}/frame1/index.html`} css={`/frame1/index.min.css`} />
<DemoFrame html={`${demoPath}/frame1/index.html`} css={demoPath + `/frame1/index.min.css`} />
I had tried adding these two lines to settings.json
but not working.
"prettier.printWidth": 2000,
"prettier.singleAttributePerLine": false,