Skip to content

Simple plugin to check for native imports in non-native code

Notifications You must be signed in to change notification settings

alj1s/eslint-plugin-react-native-import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-react-native-import

Checks cross-platform code for react-native import in non-native executing code

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-react-native-import:

$ npm install eslint-plugin-react-native-import --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-react-native-import globally.

Usage

Add react-native-import to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "react-native-import"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "react-native-import/no-native-import": 2
    }
}

Supported Rules

  • react-native-import/no-native-import

About

Simple plugin to check for native imports in non-native code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published