Registry / testing / eslint-config-react-native

eslint-config-react-native

JSON →
library4.1.0jsnpmunverified

Pluggable ESLint config for React Native that you can import, extend and override. Version 4.1.0 (latest). Provides a biased, opinionated set of lint rules focused on safety checks and best practices for React Native projects, with a bias toward code concision. Extends eslint-config-esnext and includes React, JSX, and React Native specific rules from eslint-plugin-react and eslint-plugin-react-native. It enables browser environment, JSX parsing, and recommended rules like display-name, prop-types, and no-unused-styles. Released with semver, maintained by kunalgolani.

npm install eslint-config-react-native
INSTALL
IMPORT
SIG · ESLINT-CONFIG-REAC
E
eslint-config-react-native
testingjavascriptv4.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

config
extends: ['react-native']
Use in .eslintrc file under extends

Install the config and ESLint, create a basic .eslintrc.js extending the config, and run ESLint on a source directory.

npm install --save-dev eslint-config-react-native eslint # Create .eslintrc.js: module.exports = { extends: ['react-native'], rules: { 'react-native/no-unused-styles': 'error', }, }; # Run ESLint: npx eslint src/
Debug
Known issues
deprecatedeslint-config-react-native depends on eslint-config-esnext which may use outdated rules
fix
Consider overriding individual rules or migrating to modern alternatives like eslint-config-airbnb or @react-native/eslint-config
affects: >=4.0.0
gotchaConfig enables 'browser: true' which may be inappropriate for React Native environment
fix
Override env in your own config: env: { browser: false }
affects: *
breakingVersion 3.x to 4.x changed peer dependency eslint range from ^2.0.0 to ^6.0.0
fix
Update eslint to ^6.0.0
affects: >=3.0.0 <4.0.0
Errors
Common errors & fixes
ESLint couldn't find the config "react-native".
The config package is not installed or not in node_modules
fix
npm install --save-dev eslint-config-react-native
Failed to load plugin 'react' declared in 'eslint-config-react-native': Cannot find module 'eslint-plugin-react'
Missing required plugin (eslint-plugin-react) as a dependency
fix
npm install --save-dev eslint-plugin-react
Upgrade
Version history
4.1.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency required to run ESLint rules
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-config-react-native — npm install eslint-config-react-native · libregistry