Last active
October 2, 2018 11:29
-
-
Save codespool/e8cbf4de51b39471ed60cc3932ff99ed to your computer and use it in GitHub Desktop.
Adds all needed codestyle dependencies
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
#!/bin/bash | |
##################################### | |
# npm 5+ required | |
# run in the root of your npm project | |
# edit env as needed (browser or node) | |
##################################### | |
npm i -D eslint prettier eslint eslint-config-prettier eslint-plugin-prettier babel-eslint@8 | |
npx install-peerdeps --dev eslint-config-airbnb | |
echo '{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"node": true | |
} | |
"extends": ["airbnb", "prettier"], | |
"plugins": ["prettier"], | |
"rules": { | |
"prettier/prettier": ["error"], | |
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }] | |
} | |
}' > .eslintrc | |
echo '{ | |
"singleQuote": true, | |
"trailingComma": "es5" | |
}' > .prettierrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
copy this file to the root of your project, make it executable and run it once: