You probably don't have any kind of custom formatting set up in your editor and that's the default behavior, or maybe you have some custom rule that is giving you that result.
We have a custom eslint config we use with prettier to handle our formatting. The config package is @elastic/eslint-config-kibana and you can find the source here. I believe you'll have that by default if you're using the plugin generator (which you can find here). Once you have that, and have configured eslint to use prettier, you just need to configure VScode to use eslint for handle the formatting. There's a bunch of docs and instructions online for how to do all those.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.