Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Only run staged JS into JSHint #21

Closed
westonruter opened this issue Nov 16, 2013 · 1 comment
Closed

Only run staged JS into JSHint #21

westonruter opened this issue Nov 16, 2013 · 1 comment

Comments

@westonruter
Copy link
Contributor

Currently, a fix can be applied but not staged, and this passes JSHint. We need to pass the staged file into JSHint instead.

@westonruter
Copy link
Contributor Author

This has been done for awhile:

wp-dev-lib/pre-commit

Lines 61 to 62 in d5426d4

STAGED_JS_FILES=( $(git status --porcelain -- $PATH_INCLUDES | sed 's/[^ ]* -> *//g' | egrep $GIT_STATUS_EGREP'\.js$' | cut -c4-) )
if [ ${#STAGED_JS_FILES[@]} != 0 ]; then

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant