@segware/eslint-config-react-native
v1.7.0
Published
## Step 1: Remove @react-native/eslint-config dependencie
Downloads
628
Readme
Getting Started
Step 1: Remove @react-native/eslint-config dependencie
yarn remove @react-native/eslint-config
Step 2: Install
yarn add -D @segware/eslint-config-react-native babel-plugin-module-resolver
Step 3: Configure eslint plugin
In the .eslintrc.js
file change the extends prop:
module.exports = {
root: true,
- extends: '@react-native',
+ extends: '@segware/eslint-config-react-native',
};
Step 4: Configure module-resolver plugin on babel.config.js
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
+ plugins: [
+ [
+ 'module-resolver',
+ {
+ root: ['./src'],
+ extensions: ['.ios.js', '.android.js', '.js', '.json'],
+ alias: {
+ '@components': './src/components',
+ },
+ },
+ ],
+ ],
};
Supported react-native version
| library version | react-native version | | --------------- | -------------------- | | 1.x.x | 0.74.2 | | 0.x.x | 0.72.6 |