FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
engine/pre-commit.sh at master · node-app-engine/engine · GitHub
node-app-engine
/
engine
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
2
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
engine
/
pre-commit.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
19 lines (16 loc) · 496 Bytes
Breadcrumbs
engine
/
pre-commit.sh
Copy path
File metadata and controls
executable file
·
19 lines (16 loc) · 496 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
!/bin/bash
#
Pre-commit hook passing files through jshint
#
#
This ensures that all js, html and json files are valid and conform
#
to expectations.
ROOT_DIR=
$(
git rev-parse --show-toplevel
)
JSHINT=
"
${ROOT_DIR}
/node_modules/jshint/bin/jshint -c
${ROOT_DIR}
/.jshintrc
"
CODE=0
for
file
in
$(
git diff-index --name-only --cached HEAD --
|
grep -w
"
src/
"
|
grep
'
\.js$
'
)
;
do
echo
"
jshint
${file}
...
"
${JSHINT}
${file}
if
[
${?}
-ne
0 ]
;
then
CODE=1
fi
done
exit
${CODE}
Back
|
FazBrowse Home
|
New Git URL