eslint-config-os-team-react-native
ESLint rules for React Native, including TypeScript.
Uses the eslint-config-airbnb-typescript
package to implement Airbnb JavaScript Style Guide.
Contains additional recommended rules for:
- Jest.
- Promise.
- Typescript.
- Prettier.
- React Native.
Installation
Prerequisites
Install the eslint
in devDependencies (-D) using the following command:
yarn add -D eslint
Step 1. Install the package
Install the exact version (-E) of the package in devDependencies (-D) using the following command:
yarn add -DE eslint-config-os-team-react-native
Step 2. Install ESLint plugins
ESLint plugins used by this config must be installed withing your project using the following command:
npx install-peerdeps -D eslint-config-os-team-react-native
Step 3. Extend your .eslintrc
Add "extends": "os-team-react-native"
to your .eslintrc
file and set parserOptions.project to the path of your tsconfig.json
.
{
"extends": "os-team-react-native",
"parserOptions": {
"project": "./tsconfig.json"
}
}