Skip to content

How to automatically run Prettier on all files in a project

New Course Coming Soon:

Get Really Good at Git

Create a .prettierrc file in your project, for example

{
  "tabWidth": 2,
  "useTabs": false,
  "semi": false
}

Then run

npx prettier -w .

Here is how can I help you: