Skip to content

Instantly share code, notes, and snippets.

@jruz
Forked from Morantron/eslint
Last active September 18, 2015 11:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jruz/d68476e3338b024c7426 to your computer and use it in GitHub Desktop.
Save jruz/d68476e3338b024c7426 to your computer and use it in GitHub Desktop.
Use local eslint if available if not use global
eslint () {
if [[ -f ./node_modules/.bin/eslint ]]; then
./node_modules/.bin/eslint $*
else
"${$(nvm which default)%node}eslint" $*
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment