Alternative option as those word wrap options didn't help in javascript document:
- Click Settings - search prettier.printWidth - set value to 200 or more (default was 80)
Now Format document doesnt break your lines.