An ESLint config for React Native projects written in TypeScript
Includes rules for:
- eslint:recommended
- @typescript-eslint
- import
- react
- react-hooks
- react-native
- react-native-community
- prettier
- simple-import-sort
yarn add -D eslint eslint-config-rn-ts
In .eslintrc.js
file, add:
{
extends: ['rn-ts'],
rules: {
// override rules
}
}
To run prettier and rearrange import statements run:
eslint --fix
MIT