To enable our ESLint, we need to create a .eslintrc file and add the rules we want to turn off:
- 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" } }
- 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": ...