1

I'm using Prettier on VS Code with the editor.formatOnSave enabled. Every time I save my (js)|| (jsx) file and prettier runs it unfolds all my functions. Is there a way to prevent this from happening?

I have a large React component and would like to keep the component collapsed.

1 Answers1

2

Setting editor.foldingStrategy to "indentation" in VScode settings will resolve your issue.

kavigun
  • 2,219
  • 2
  • 14
  • 33