ESLint

Using AirB&B standard.

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

  2. Install ESLint - Pluggable JavaScript linter 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"
    }
}

Last updated

Was this helpful?