React Native
  • Initial page
  • Set-up
    • Prepare the environment
    • ESLint
    • Debugger
  • Introduction
    • React v.s. React Native
    • Project Tree & Script Structure
  • Component & Props
    • What is Props
    • What is Compoent
      • Axios and Component State
      • Class-base components
      • Example
        • Activity Indicator
        • Rendering Large list
        • Card
  • Styling
    • What is Styling
    • Primitive elements
    • Flexbox
      • justifyContent
      • flexDirection
    • More on styling
    • Alignment & Touchable Item
  • Redux
    • What is Redux
    • What is Reducer
  • React-thunk
    • Untitled
  • Build & Release
    • Untitled
Powered by GitBook
On this page

Was this helpful?

  1. Set-up

ESLint

PreviousPrepare the environmentNextDebugger

Last updated 6 years ago

Was this helpful?

Using AirB&B standard.

  1. Install npm install-peerdeps --dev eslint-config-airbnb -g

  2. Install npm install -g eslint

  3. Install ESLint extension in vscode

  4. Navigate to project root directory and run $ eslint --init

The config is project specified and should be placed in the root directory of the project

{
    "extends": "airbnb",
    "rules": {
        "no-nested-ternary": 0,
        "react/prefer-stateless-function": 0,
        "react/jsx-filename-extension": 0,
        "import/prefer-default-export": 0,
        "no-use-before-define": 0,
        "class-methods-use-this": 0,
        "no-underscore-dangle": 0,
        "indent":"off"
    }
}
eslint-config-airbnb
ESLint - Pluggable JavaScript linter