eslint-plugin-react-native-normalized
Prevents the import of native components of React Native when there is a version of react-native-normalized
available.
Installation
npm install -D eslint-plugin-arithmetic
{
"plugins": ["react-native-normalized"],
"rules": {
"react-native-normalized/forbid-native-components": "error"
}
}
Options
This rule supports the follwing options:
disallowed
: Which imports are not allowed from react-native
. Defaults to ['Text', 'Alert', 'Image']
. Possible values: Array of Text
, Alert
, Image
, ActivityIndicator
, TextInput
Rule details
Fail
import {Text} from 'react-native'
const {Text, Image} = require('react-native')
Pass
import {Text} from 'react-native-normalized'
import {View} from 'react-native'
Ideas for further development
Author