Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
162 views
in Technique[技术] by (71.8m points)

javascript - prettier convert multi line to single line in constructor function

I use prettier for formatting code. Recently I followed that sometimes it's pretty annoying. It's auto create multi line to single line in constructor function. How can I stop this behavior?

Before Save

Before Save

After Save

After Save

question from:https://stackoverflow.com/questions/65879046/prettier-convert-multi-line-to-single-line-in-constructor-function

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You're having a typo.

On line 30 through 33 you're ending lines with ,. These should be semicolons ;.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...