ESLint configuration for React Native projects written in TypeScript.
- Based on @react-native-community/eslint-config but with extended ruleset.
- Leaves formatting to Prettier with eslint-config-prettier.
- Checks for cyclic imports/exports with eslint-plugin-import.
- Enforces consistent import order with eslint-plugin-import-order-alphabetical.
- Ensures accessible applications with eslint-plugin-react-native-a11y.
yarn add eslint-config-react-native-typescript
Extend the config in your .eslintrc
file.
{
"extends": "react-native-typescript"
}
Yes! (Except the TypeScript stuff of course)
Simply override any rule by assigning new rules in your .eslintrc
file.
{
"extends": "react-native-typescript",
"rules": {
"no-console": 2
}
}
Your project needs ESLint and TypeScript installed for this config to work correctly.
yarn add typescript eslint