Gathering detailed insights and metrics for eslint-plugin-react-native
Gathering detailed insights and metrics for eslint-plugin-react-native
Gathering detailed insights and metrics for eslint-plugin-react-native
Gathering detailed insights and metrics for eslint-plugin-react-native
eslint-plugin-react-native-globals
ESLint Environment for React Native
@react-native/eslint-plugin
ESLint rules for @react-native/eslint-config
@react-native-community/eslint-plugin
ESLint rules for @react-native-community/eslint-config
eslint-plugin-react-native-wix
Custom react-native eslint plugins for internal usage by wix
npm install eslint-plugin-react-native
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
210,103,986
Last Day
43,782
Last Week
1,038,444
Last Month
4,806,029
Last Year
62,529,125
MIT License
743 Stars
442 Commits
131 Forks
9 Watchers
45 Branches
45 Contributors
Updated on Jun 16, 2025
Minified
Minified + Gzipped
Latest Version
5.0.0
Package Id
eslint-plugin-react-native@5.0.0
Unpacked Size
51.87 kB
Size
12.35 kB
File Count
14
NPM Version
10.9.0
Node Version
22.11.0
Published on
Dec 30, 2024
Cumulative downloads
Total Downloads
Last Day
-11.4%
43,782
Compared to previous day
Last Week
-12.6%
1,038,444
Compared to previous week
Last Month
-3.4%
4,806,029
Compared to previous month
Last Year
15.3%
62,529,125
Compared to previous year
Dear users, first of all, thanks for using the plugin! At the moment development activity is low, I've personally not worked with React Native for many years and have little time to continue updating the plugin. I'll do my best to update the plugin to ensure compatibility with new eslint versions, but unfortunately I do not have time to asses new features/pull requests. Thanks for your understanding!
React Native specific linting rules for ESLint. This repository is structured like (and contains code from) the excellent eslint-plugin-react.
Install ESLint either locally or globally.
1$ npm install --save-dev eslint
To make most use of this plugin, its recommended to install eslint-plugin-react in addition to ESLint. If you installed ESLint
globally, you have to install eslint-plugin-react globally too. Otherwise, install it locally.
1$ npm install --save-dev eslint-plugin-react
Similarly, install eslint-plugin-react-native
1$ npm install --save-dev eslint-plugin-react-native
Add plugins
section and specify ESLint-plugin-React (optional) and ESLint-plugin-react-native as a plugin.
1{ 2 "plugins": ["react", "react-native"] 3}
If it is not already the case you must also configure ESLint
to support JSX.
1{ 2 "parserOptions": { 3 "ecmaFeatures": { 4 "jsx": true 5 } 6 } 7}
In order to whitelist all browser-like globals, add react-native/react-native
to your config.
1{ 2 "env": { 3 "react-native/react-native": true 4 } 5}
To use another stylesheet providers.
1settings: { 2 'react-native/style-sheet-object-names': ['EStyleSheet', 'OtherStyleSheet', 'PStyleSheet'] 3}
Finally, enable all of the rules that you would like to use.
1{ 2 "rules": { 3 "react-native/no-unused-styles": 2, 4 "react-native/split-platform-components": 2, 5 "react-native/no-inline-styles": 2, 6 "react-native/no-color-literals": 2, 7 "react-native/no-raw-text": 2, 8 "react-native/no-single-element-style-arrays": 2 9 } 10}
StyleSheet
rules which are not used in your React componentsStyleSheet
rules and inline styles containing color literals instead of variablesText
component<View style={[{height: 10}]}/>
This plugin also exports an all
configuration that includes every available rule.
1{ 2 "plugins": [ 3 /* ... */ 4 "react-native" 5 ], 6 "extends": [/* ... */, "plugin:react-native/all"] 7}
Note: These configurations will import eslint-plugin-react-native
and enable JSX in parser options.
No vulnerabilities found.
Reason
no vulnerabilities detected
Reason
tokens are read-only in GitHub workflows
Reason
license file detected
Details
Reason
no dangerous workflow patterns detected
Reason
all dependencies are pinned
Details
Reason
no binaries found in the repo
Reason
update tool detected
Details
Reason
GitHub code reviews found for 20 commits out of the last 30 -- score normalized to 6
Details
Reason
0 commit(s) out of 30 and 1 issue activity out of 30 found in the last 90 days -- score normalized to 0
Reason
no badge detected
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Score
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More