enabled autoformatting on save webstorm
To run Prettier on save in WebStorm 2020.1 or above, open
File -> Settings -> Languages & Frameworks ->JavaScript
after
Prettier and enable the option Run on save for files . By default, only JavaScript and TypeScript files will be formatted automatically.