How to do it...

To enable our ESLint, we need to create a .eslintrc file and add the rules we want to turn off:

  1. Creating .eslintrc file. You need to create a new file called .eslintrc at the root level:
  {    "parser": "babel-eslint",    "extends": "airbnb",    "rules": {      "arrow-parens": "off",      "comma-dangle": "off",      "function-paren-newline": "off",      "max-len": [1, 120],      "no-param-reassign": "off",      "react/require-default-props": "off"    }  }
  1. Add a script to run the linter. In your package.json file, you need to add a new script to run the linter:
  {    "name": "airbnb",    "version": "0.1.0",    "private": true,    "engines": {       "node": ">= 10.8"      },    "dependencies": {      "eslint": "^4.18.2",      "eslint-config-airbnb": "^16.1.0",      "eslint-plugin-babel": "^4.1.2", "eslint-plugin-react": ...

Get React Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.