git-format-staged
Advanced tools
Comparing version 2.0.0 to 2.1.0
{ | ||
"name": "git-format-staged", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Git command to transform staged files according to a command that accepts file content on stdin and produces output on stdout.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -64,3 +64,3 @@ # git-format-staged | ||
$ git-format-staged --formatter 'prettier --stdin' 'src/*.js' | ||
$ git-format-staged --formatter 'prettier --stdin --stdin-filepath "{}"' 'src/*.js' | ||
@@ -88,2 +88,12 @@ That will format all files under `src/` and its subdirectories using | ||
The formatter command may include a placeholder, `{}`, which will be replaced | ||
with the path of the file that is being formatted. This is useful if your | ||
formatter needs to know the file extension to determine how to format or to | ||
lint each file. For example: | ||
$ git-format-staged -f 'prettier --stdin --stdin-filepath "{}"' '*.js' '*.css' | ||
Do not attempt to read or write to `{}` in your formatter command! The | ||
placeholder exists only for referencing the file name and path. | ||
### Check staged changes with a linter without formatting | ||
@@ -90,0 +100,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21176
190