mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
Merge pull request #1497 from tridactyl/fix_precommit_hook
Fix precommit hook
This commit is contained in:
commit
b2eafdf18d
1 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
# Accepts no arguments
|
||||
# Returns git-add'ed files as a list of filenames separated by a newline character
|
||||
cachedTSLintFiles() {
|
||||
git diff --cached --name-only --diff-filter=ACM "*.js" "*.jsx" "*.ts" "*.tsx"
|
||||
git diff --cached --name-only --diff-filter=ACM "*.js" "*.jsx" "*.ts" "*.tsx" ":(exclude)*.d.ts"
|
||||
}
|
||||
|
||||
# Accepts no arguments
|
||||
|
@ -33,7 +33,7 @@ tslintUgly() {
|
|||
local acc=""
|
||||
local IFS=$'\n'
|
||||
local tmpdir=$(mktemp -d "tslint.XXXXXXXXX")
|
||||
for jsfile in $1; do
|
||||
for jsfile in "$@"; do
|
||||
tmpfile="$tmpdir/$jsfile"
|
||||
mkdir -p "$(dirname "$tmpfile")"
|
||||
staged "$jsfile" > "$tmpfile"
|
||||
|
|
Loading…
Add table
Reference in a new issue