How do I format all files in a Visual Studio Code project?

Chris Williams picture Chris Williams · Apr 27, 2017 · Viewed 38.2k times · Source

Is there a way to format all files in a project without formatting each one individually?

Answer

Stellan Lindell picture Stellan Lindell · Oct 9, 2018

You can use an extension called ”Format Files”.

”Use: Open command palette (Ctrl+Shift+P) & enter "Format Files" Create keybinding to 'editor.action.formatFiles' command. Right-click a workspace folder and select 'Format Files' to format all files in directory.”

Source: https://marketplace.visualstudio.com/items?itemName=jbockle.jbockle-format-files