Search code examples
phpstormglobprettier

Glob pattern for different file types in different directories


I want to configure my IDE (PhpStorm) to run Prettier on save, for different file types in different directories, but it only accepts one glob pattern.

I want one pattern that will do the work of both of these patterns:

  • assets/**/*.{js,ts,json,css,scss,sass}
  • **/*.{md,yml}

I want to reformat js,ts,json,css,scss,sass files only within the assets/ dir, and md,yml files anywhere they're found.


Solution

  • There is no way to do this currently, please vote for WEB-52968 to get notified on any progress with this request