Last active
August 13, 2018 07:15
-
-
Save zhangtaihao/015e40021aaf1da6bacdc34dbb1b8f06 to your computer and use it in GitHub Desktop.
Init JS project with Airbnb style guide
This file contains hidden or 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/sh | |
DEFAULT_GITIGNORE='.idea\nnode_modules' | |
DEFAULT_ESLINTIGNORE='node_modules' | |
DEFAULT_ESLINTRC='{"parser":"babel-eslint","extends":"airbnb","plugins":["prefer-object-spread"],"rules":{"prefer-object-spread/prefer-object-spread":2}}' | |
DEFAULT_BABELRC='{"presets":["env"]}' | |
git init | |
npm init -y | |
npm i -D babel-eslint eslint-plugin-prefer-object-spread jest babel-jest | |
npx install-peerdeps --dev eslint-config-airbnb | |
echo $DEFAULT_ESLINTRC > .eslintrc | |
echo $DEFAULT_ESLINTIGNORE > .eslintignore | |
echo $DEFAULT_GITIGNORE > .gitignore | |
echo $DEFAULT_BABELRC > .babelrc | |
touch index.js | |
jest --init |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment