mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
29 lines
522 B
Bash
Executable File
29 lines
522 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
ORIGDIR=$(pwd)
|
|
cd $(dirname $0)
|
|
SCRIPTDIR=$(pwd)
|
|
cd ../../..
|
|
TOPDIR=$(pwd)
|
|
|
|
INFINITY=10000
|
|
|
|
cd "$SCRIPTDIR"
|
|
${TOPDIR}/dev_bundle/bin/npm install
|
|
|
|
cd "$TOPDIR"
|
|
|
|
files_to_lint="."
|
|
if [ "$1" == "modified" ]; then
|
|
files_to_lint=$(git diff --cached --name-only --diff-filter=ACM \
|
|
| grep '\.js$')
|
|
fi
|
|
|
|
if [ -n "$files_to_lint" ]; then
|
|
"${TOPDIR}/dev_bundle/bin/node" \
|
|
"${SCRIPTDIR}/node_modules/.bin/eslint" \
|
|
--quiet \
|
|
-c "${SCRIPTDIR}/.eslintrc" \
|
|
$files_to_lint
|
|
fi
|