VSCode Extension: Batch formatting files not filtered by the ignore
configuration
VSCode Extensions Select Format Files By Ignores
- Format Workspace
- Open command pallette (
Ctrl + Shift + P
) - Enter
Start Format Workspace By Ignores 📂
- Open command pallette (
- Format Folder
Right
click a folder- Select
Start Format Folder By Ignores 📂
- Custom Ignore File
- Create a file called
.formatignore
under the folder, and then write the ignore rules (like.gitignore
)
- Create a file called
For example: Exclude all svg files
*.svg
For example: Only include ts files
*
!src/**/
!src/**/*.ts
formatFilesByIgnores.useignoreExtension
: Is use ignore extension ?default
: true
formatFilesByIgnores.ignoreExtension
: Ignore extension rules (root folder)default
: [ "node_modules", ".vscode", ".git", "dist" ]
formatFilesByIgnores.ignoreFileNames
: Ignore files namedefault
: [ ".gitignore", ".formatignore" ]
formatFilesByIgnores.collapseExplorerFolders
: Whether to collapse the explorer folder after formatting?default
: true
formatFilesByIgnores.filterConcurrency
: Filter concurrencydefault
: 16
ignoreExtension < ignoreFileNames
ignoreFileNames[1] < ignoreFileNames[2]
Have fun 🎉🎉🎉🎉