Make sure you npm init
, or at least have a package.json file before proceeding!
You will need npm/npx installed. It will work on Windows, but just needs to be run in a bash shell, like VS Code's integrated terminal.
- Clone this repo somewhere on your machine, preferably in your home directory (~/), and NOT in your app's directory.
cd
git clone https://github.com/paulolramos/eslint-prettier-airbnb-react style-config
- Navigate to your app directory where you want to include this style configuration.
cd myApp
- Run the shell script inside your app's root directory. (The example below assumes you cloned this repo inside your home directory)
~/style-config/eslint-prettier-config.sh
- The shell script added two config files
- .eslintrc.json
- .prettierrc
This script follows this tutorial by Jeffrey Zhen.