1.1.2 • Published 3 years ago

eslint-plugin-react-native-normalized v1.1.2

Weekly downloads
1,105
License
ISC
Repository
github
Last release
3 years ago

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

# Shell
npm install -D eslint-plugin-arithmetic
// eslintrc.js
{
    "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 from normalized
import {View} from 'react-native' // No react-native-normalized version available.

Ideas for further development

  • Autofixing :D

Author

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago