Last active
September 18, 2025 07:55
-
-
Save radiovisual/7c27e5a1d0f7aa56e0e3922c98e19ffc to your computer and use it in GitHub Desktop.
React Native AirBnB ESLint Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "parser": "babel-eslint", | |
| "plugins": [ | |
| "react", | |
| "react-native" | |
| ], | |
| "parserOptions": { | |
| "ecmaFeatures": { | |
| "jsx": true, | |
| "modules": true | |
| } | |
| }, | |
| "extends" : [ | |
| "eslint:recommended", | |
| "plugin:react/recommended", | |
| "airbnb-base" | |
| ], | |
| "rules" : { | |
| "arrow-body-style" : 'warn' | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm install --save-dev babel-eslint eslint-config-airbnb-base eslint-plugin-react eslint-plugin-react-native |
Thanks.
Awesome.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You also need to install
eslint-plugin-importandeslint. I asume you forgot them because you have them installed globally, wich is a bat practice, so:npm i eslint-plugin-import eslint --save-dev.Then can run
npx eslint .or add this scripts to yourpackage.json:And then run
npm run estlintornpm run eslint-fixif you want to autofix your code.Also is cool to have a
pre-commithook witheslint, maybe usingpre-gitnpm package and adding this to thepackage.json: