-
-
Save jruz/d68476e3338b024c7426 to your computer and use it in GitHub Desktop.
Use local eslint if available if not use global
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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