File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,13 @@ file names.
7373The formatter command must read file content from ` stdin ` , and output formatted
7474content to ` stdout ` .
7575
76+ Note that the syntax of the ` fnmatch ` glob match is a is a bit different from
77+ normal shell globbing. So if you need to match multiple patterns, you should
78+ pass multiple arguments with different patterns, and they will be grouped.
79+ So instead of e.g. ` 'src/**/*.{js,jsx,ts}' ` , you would use:
80+
81+ $ git-format-staged --formatter 'prettier --stdin-filepath "{}"' 'src/*.js' 'src/*.jsx' 'src/*.ts'
82+
7683Files can be excluded by prefixing a pattern with ` ! ` . For example:
7784
7885 $ git-format-staged --formatter 'prettier --stdin-filepath "{}"' '*.js' '!flow-typed/*'
You can’t perform that action at this time.
0 commit comments