VS code prettier adds unwanted curly brackets / blocks “ ”

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



VS code prettier adds unwanted curly brackets / blocks “ ”


" "



Explanation:



This does not happen always. I work on React Native, that is JavaScript. If prettier finds space in my code, it will convert space in unwanted " ".


JavaScript


" "



See example



I had this line in my code.


Item Total getPriceText(this.calculateTotal(
this.state.extraItem.extras
))



When i format code then it is converted into this.


Item Total" "
getPriceText(
this.calculateTotal(this.state.extraItem.extras)
)



This makes my code buggy, and it makes run time crashes my app. Which i solve by finding these extra brackets in my code.



Any solutions please?





there is a bug report on this already: github.com/prettier/prettier/issues/4223
– Claies
Jun 16 at 10:51





I'm voting to close this question as off-topic because the question is asking to fix a problem with a 3rd party library which already has a bug report filed regarding the issue. github.com/prettier/prettier/issues/4223
– Claies
Jun 16 at 10:52









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered