Last active
August 30, 2016 16:19
-
-
Save amadden80/056d9f827a35b8671687dbec8162fb88 to your computer and use it in GitHub Desktop.
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
function prepEsLinter() { | |
if [ -f "package.json" ]; then | |
echo "PackJSON alright there!!!" | |
else | |
echo "Creating a default package.json... might want to edit this!" | |
npm init -f | |
fi | |
( | |
export PKG=eslint-config-airbnb; | |
npm info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG" | |
echo "\"extends\": \"airbnb\"" > .eslintrc | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment