Skip to content

Instantly share code, notes, and snippets.

@sokna7
Last active November 1, 2020 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sokna7/762c1907595d0e756d9b85932b7d33ea to your computer and use it in GitHub Desktop.
Save sokna7/762c1907595d0e756d9b85932b7d33ea to your computer and use it in GitHub Desktop.
react native js eslintrc example
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