Search code examples
formattingwebstormprettier

WebStorm: use .prettierrc configurations for formatting


In WebStorm I want to use my custom configuration from .prettierrc file for code formatting.

It can change by the time I want to sync.

For example pressing Ctrl + Alt + P and Ctrl + Alt + L let my WebStorm formatting.


Solution

  • Just place your .prettierrc in the project root and set up Prettier as the default formatter - this should do the thing