-
-
Save sokna7/762c1907595d0e756d9b85932b7d33ea to your computer and use it in GitHub Desktop.
react native js eslintrc example
This file contains 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
module.exports = { | |
root: true, | |
env: { | |
es6: true, | |
'react-native/react-native': true, | |
}, | |
parserOptions: { | |
ecmaFeatures: { | |
jsx: true, | |
}, | |
sourceType: 'module', | |
}, | |
extends: [ | |
'eslint:recommended', | |
'plugin:react/recommended', | |
'@react-native-community', | |
'prettier', | |
], | |
rules: { | |
'prettier/prettier': 'error', | |
'react-hooks/rules-of-hooks': 'error', // if using hooks | |
'react-hooks/exhaustive-deps': 'warn', // if using hooks | |
}, | |
plugins: ['react', 'react-hooks', 'react-native', 'prettier'], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment