Search code examples
javascriptprettier

How can I tell prettier to parse files recursively?


I'd like to ask prettier to parse my JavaScript files recursively instead of specifying each folder in which it should check the files.

I'd like to do something like:

prettier --write "all_js_files_except_node_modules_folder"

I don't find much into their documentation. Any suggestions?


Solution

  • This issue from a few weeks back seems like it answers your question. TL;DR:

    prettier "{,!(node_modules)/**/}*.js"