Skip to content

Instantly share code, notes, and snippets.

@sokna7
Last active November 1, 2020 18:36
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sokna7/49bd3c15fb048241bb2607a2b4878877 to your computer and use it in GitHub Desktop.
react native ts eslintrc example
module.exports = {
root: true,
env: {
es6: true,
'react-native/react-native': true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'@react-native-community',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'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',
'@typescript-eslint',
'prettier',
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment