Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save davidrf/f24fb5dbda87cacbaaff7980e08ae1cb to your computer and use it in GitHub Desktop.
Save davidrf/f24fb5dbda87cacbaaff7980e08ae1cb to your computer and use it in GitHub Desktop.

Lecture Setup

  1. If you don't already have it, install Homebrew,

  2. Install Node and Watchman

$ brew install node
$ brew install watchman
  1. Install React Native CLI, create a new Project, cd into it
$ npm install -g react-native-cli
$ react-native init IntroductionToReact
$ cd IntroductionToReact
  1. Set up Eslint
$ npm i -D eslint-config-react-app babel-eslint@7.0.0 eslint@3.8.1 eslint-plugin-flowtype@2.21.0 
$ npm i -D eslint-plugin-import@2.0.1 eslint-plugin-jsx-a11y@2.2.3 eslint-plugin-react@6.4.1
$ touch .eslintrc.js

Add the following to your .eslintrc.js file

module.exports = {
  "extends": "react-app"
};
  1. If you don't already have it, Install the Atom text editor
  2. Install the linter-eslint Atom package by:
    1. Opening Atom
    2. Opening preferences with Command + ,
    3. Click on "Install" in the left pane
    4. Fill in "linter-eslint" in the "Search packages" input and press Return
    5. Click on the blue "Install" button for linter-eslint
@hchood
Copy link

hchood commented Jan 26, 2017

thanks @davidrf ! FYI I think you may need to swap the order of the Eslint package installation -- I got an UNMET PEER DEPENDENCY error installing eslint-config-react-app until i installed eslint-plugin-import.

@wingchi
Copy link

wingchi commented Feb 10, 2017

Thanks! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment