# React Native

The config new React Native projects start with. Written for the eslintrc format.

- Linter: ESLint
- Package: `@react-native/eslint-config` (https://github.com/facebook/react-native/tree/main/packages/eslint-config-react-native)
- Author: Meta (official)
- Rules: 79, plus 7 from plugins this site doesn't track
- Weekly downloads: 1.2M, +5.8% last quarter
- Technologies: javascript (61), react (12), testing (4), typescript (2)

## Install

```sh
npm install -D eslint @react-native/eslint-config
pnpm add -D eslint @react-native/eslint-config
yarn add -D eslint @react-native/eslint-config
bun add -d eslint @react-native/eslint-config
```

## Config: `eslint.config.js`

```js
// .eslintrc.json (legacy config format)
{
  "extends": "@react-native"
}
```

## Rules it enables

| Rule | Severity | Description | Reach |
| --- | --- | --- | --- |
| [eslint/no-cond-assign](https://lintradar.dev/rules/eslint/no-cond-assign.md) | warn | Disallow assignment operators in conditional expressions | 282.3M |
| [eslint/no-ex-assign](https://lintradar.dev/rules/eslint/no-ex-assign.md) | warn | Disallow reassigning exceptions in `catch` clauses | 282.3M |
| [eslint/no-global-assign](https://lintradar.dev/rules/eslint/no-global-assign.md) | error | Disallow assignments to native objects or read-only global variables | 282.3M |
| [eslint/no-shadow-restricted-names](https://lintradar.dev/rules/eslint/no-shadow-restricted-names.md) | warn | Disallow identifiers from shadowing restricted names | 282.3M |
| [eslint/no-sparse-arrays](https://lintradar.dev/rules/eslint/no-sparse-arrays.md) | warn | Disallow sparse arrays | 282.3M |
| [eslint/use-isnan](https://lintradar.dev/rules/eslint/use-isnan.md) | warn | Require calls to `isNaN()` when checking for `NaN` | 282.3M |
| [eslint/no-control-regex](https://lintradar.dev/rules/eslint/no-control-regex.md) | warn | Disallow control characters in regular expressions | 282.3M |
| [eslint/no-useless-escape](https://lintradar.dev/rules/eslint/no-useless-escape.md) | warn | Disallow unnecessary escape characters | 281.5M |
| [eslint/no-empty-character-class](https://lintradar.dev/rules/eslint/no-empty-character-class.md) | warn | Disallow empty character classes in regular expressions | 281.1M |
| [eslint/valid-typeof](https://lintradar.dev/rules/eslint/valid-typeof.md) | warn | Enforce comparing `typeof` expressions against valid strings | 280.8M |
| [eslint/no-with](https://lintradar.dev/rules/eslint/no-with.md) | warn | Disallow `with` statements | 279.7M |
| [eslint/no-const-assign](https://lintradar.dev/rules/eslint/no-const-assign.md) | error | Disallow reassigning `const`, `using`, and `await using` variables | 278.7M |
| [eslint/no-dupe-keys](https://lintradar.dev/rules/eslint/no-dupe-keys.md) | error | Disallow duplicate keys in object literals | 278.7M |
| [eslint/no-func-assign](https://lintradar.dev/rules/eslint/no-func-assign.md) | warn | Disallow reassigning `function` declarations | 278.7M |
| [eslint/no-obj-calls](https://lintradar.dev/rules/eslint/no-obj-calls.md) | warn | Disallow calling global object properties as functions | 278.7M |
| [eslint/no-unreachable](https://lintradar.dev/rules/eslint/no-unreachable.md) | error | Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements | 278.7M |
| [eslint/no-debugger](https://lintradar.dev/rules/eslint/no-debugger.md) | warn | Disallow the use of `debugger` | 278.2M |
| [eslint/no-extra-boolean-cast](https://lintradar.dev/rules/eslint/no-extra-boolean-cast.md) | warn | Disallow unnecessary boolean casts | 278.2M |
| [eslint/no-dupe-class-members](https://lintradar.dev/rules/eslint/no-dupe-class-members.md) | error | Disallow duplicate class members | 274.5M |
| [eslint/no-delete-var](https://lintradar.dev/rules/eslint/no-delete-var.md) | warn | Disallow deleting variables | 253.8M |
| [eslint/no-invalid-regexp](https://lintradar.dev/rules/eslint/no-invalid-regexp.md) | warn | Disallow invalid regular expression strings in `RegExp` constructors | 252.6M |
| [eslint/no-fallthrough](https://lintradar.dev/rules/eslint/no-fallthrough.md) | warn | Disallow fallthrough of `case` statements | 231.5M |
| [eslint/no-regex-spaces](https://lintradar.dev/rules/eslint/no-regex-spaces.md) | warn | Disallow multiple spaces in regular expressions | 231.5M |
| [eslint/no-octal](https://lintradar.dev/rules/eslint/no-octal.md) | warn | Disallow octal literals | 231.4M |
| [react-hooks/exhaustive-deps](https://lintradar.dev/rules/react-hooks/exhaustive-deps.md) | error | Verifies the list of dependencies for Hooks like useEffect and similar | 201.1M |
| [react-hooks/rules-of-hooks](https://lintradar.dev/rules/react-hooks/rules-of-hooks.md) | error | Enforces the Rules of Hooks | 201.1M |
| [typescript/no-unused-vars](https://lintradar.dev/rules/typescript/no-unused-vars.md) | error | Disallow unused variables | 185.6M |
| [react/jsx-no-comment-textnodes](https://lintradar.dev/rules/react/jsx-no-comment-textnodes.md) | error | Disallow comments from being inserted as text nodes | 167.2M |
| [react/jsx-no-duplicate-props](https://lintradar.dev/rules/react/jsx-no-duplicate-props.md) | error | Disallow duplicate properties in JSX | 167.2M |
| [react/no-string-refs](https://lintradar.dev/rules/react/no-string-refs.md) | error | Disallow using string references | 163.2M |
| [react/jsx-no-undef](https://lintradar.dev/rules/react/jsx-no-undef.md) | error | Disallow undeclared variables in JSX | 136.7M |
| [react/jsx-uses-react](https://lintradar.dev/rules/react/jsx-uses-react.md) | warn | Disallow React to be incorrectly marked as unused | 132.6M |
| [react/jsx-uses-vars](https://lintradar.dev/rules/react/jsx-uses-vars.md) | warn | Disallow variables used in JSX to be incorrectly marked as unused | 132.6M |
| [eslint/no-caller](https://lintradar.dev/rules/eslint/no-caller.md) | warn | Disallow the use of `arguments.caller` or `arguments.callee` | 102.1M |
| [eslint/no-eval](https://lintradar.dev/rules/eslint/no-eval.md) | error | Disallow the use of `eval()` | 101.4M |
| [eslint/no-iterator](https://lintradar.dev/rules/eslint/no-iterator.md) | warn | Disallow the use of the `__iterator__` property | 72.9M |
| [eslint/eqeqeq](https://lintradar.dev/rules/eslint/eqeqeq.md) | warn | Require the use of `===` and `!==` | 51.1M |
| [eslint/no-self-compare](https://lintradar.dev/rules/eslint/no-self-compare.md) | warn | Disallow comparisons where both sides are exactly the same | 50.6M |
| [eslint/no-sequences](https://lintradar.dev/rules/eslint/no-sequences.md) | warn | Disallow comma operators | 50.6M |
| [eslint/no-octal-escape](https://lintradar.dev/rules/eslint/no-octal-escape.md) | warn | Disallow octal escape sequences in string literals | 50.6M |
| [eslint/no-implied-eval](https://lintradar.dev/rules/eslint/no-implied-eval.md) | warn | Disallow the use of `eval()`-like methods | 50.4M |
| [eslint/no-labels](https://lintradar.dev/rules/eslint/no-labels.md) | warn | Disallow labeled statements | 49.8M |
| [eslint/no-lone-blocks](https://lintradar.dev/rules/eslint/no-lone-blocks.md) | warn | Disallow unnecessary nested blocks | 49.8M |
| [jest/no-focused-tests](https://lintradar.dev/rules/jest/no-focused-tests.md) | warn | Disallow focused tests | 48.5M |
| [jest/no-identical-title](https://lintradar.dev/rules/jest/no-identical-title.md) | warn | Disallow identical titles | 48.5M |
| [eslint/no-proto](https://lintradar.dev/rules/eslint/no-proto.md) | warn | Disallow the use of the `__proto__` property | 46.5M |
| [eslint/no-script-url](https://lintradar.dev/rules/eslint/no-script-url.md) | warn | Disallow `javascript:` URLs | 46.4M |
| [eslint/no-undef-init](https://lintradar.dev/rules/eslint/no-undef-init.md) | warn | Disallow initializing variables to `undefined` | 46.4M |
| [eslint/no-label-var](https://lintradar.dev/rules/eslint/no-label-var.md) | warn | Disallow labels that share a name with a variable | 46.2M |
| [eslint/dot-notation](https://lintradar.dev/rules/eslint/dot-notation.md) | warn | Enforce dot notation whenever possible | 45.6M |
| [eslint/no-array-constructor](https://lintradar.dev/rules/eslint/no-array-constructor.md) | warn | Disallow `Array` constructors | 45.5M |
| [eslint/radix](https://lintradar.dev/rules/eslint/radix.md) | warn | Enforce the use of the radix argument when using `parseInt()` | 42.3M |
| [eslint/no-new-wrappers](https://lintradar.dev/rules/eslint/no-new-wrappers.md) | warn | Disallow `new` operators with the `String`, `Number`, and `Boolean` objects | 22.7M |
| [eslint/no-extend-native](https://lintradar.dev/rules/eslint/no-extend-native.md) | warn | Disallow extending native types | 22.7M |
| [eslint/no-extra-bind](https://lintradar.dev/rules/eslint/no-extra-bind.md) | warn | Disallow unnecessary calls to `.bind()` | 22.7M |
| [eslint/no-new-func](https://lintradar.dev/rules/eslint/no-new-func.md) | error | Disallow `new` operators with the `Function` object | 22.1M |
| [eslint/no-new-object](https://lintradar.dev/rules/eslint/no-new-object.md) | warn | Disallow `Object` constructors | 19M |
| [eslint/no-new](https://lintradar.dev/rules/eslint/no-new.md) | warn | Disallow `new` operators outside of assignments or comparisons | 18M |
| [eslint/yoda](https://lintradar.dev/rules/eslint/yoda.md) | warn | Require or disallow "Yoda" conditions | 18M |
| [jest/no-disabled-tests](https://lintradar.dev/rules/jest/no-disabled-tests.md) | warn | Disallow disabled tests | 18M |
| [jest/valid-expect](https://lintradar.dev/rules/jest/valid-expect.md) | warn | Enforce valid `expect()` usage | 18M |
| [eslint/no-return-assign](https://lintradar.dev/rules/eslint/no-return-assign.md) | warn | Disallow assignment operators in `return` statements | 17.3M |
| [eslint/no-void](https://lintradar.dev/rules/eslint/no-void.md) | warn | Disallow `void` operators | 17.3M |
| [eslint/no-alert](https://lintradar.dev/rules/eslint/no-alert.md) | warn | Disallow the use of `alert`, `confirm`, and `prompt` | 13.8M |
| [eslint/no-bitwise](https://lintradar.dev/rules/eslint/no-bitwise.md) | warn | Disallow bitwise operators | 13.6M |
| [eslint/no-new-require](https://lintradar.dev/rules/eslint/no-new-require.md) | warn | Disallow `new` operators with calls to `require` | 11.2M |
| [eslint/no-path-concat](https://lintradar.dev/rules/eslint/no-path-concat.md) | warn | Disallow string concatenation with `__dirname` and `__filename` | 11.2M |
| [react/self-closing-comp](https://lintradar.dev/rules/react/self-closing-comp.md) | warn | Disallow extra closing tags for components without children | 6.7M |
| [react/no-did-update-set-state](https://lintradar.dev/rules/react/no-did-update-set-state.md) | warn | Disallow usage of setState in componentDidUpdate | 4.7M |
| [react/no-unstable-nested-components](https://lintradar.dev/rules/react/no-unstable-nested-components.md) | warn | Disallow creating unstable components inside components | 4.7M |
| [typescript/no-shadow](https://lintradar.dev/rules/typescript/no-shadow.md) | warn | Disallow variable declarations from shadowing variables declared in the outer scope | 3.5M |
| [eslint/no-div-regex](https://lintradar.dev/rules/eslint/no-div-regex.md) | warn | Disallow equal signs explicitly at the beginning of regular expressions | 3.3M |
| [eslint/no-catch-shadow](https://lintradar.dev/rules/eslint/no-catch-shadow.md) | warn | Disallow `catch` clause parameters from shadowing variables in the outer scope | 3.3M |
| [eslint/consistent-this](https://lintradar.dev/rules/eslint/consistent-this.md) | warn | Enforce consistent naming when capturing the current execution context | 1.4M |
| [eslint/no-negated-in-lhs](https://lintradar.dev/rules/eslint/no-negated-in-lhs.md) | warn | Disallow negating the left operand in `in` expressions | 1.2M |
| [react/no-did-mount-set-state](https://lintradar.dev/rules/react/no-did-mount-set-state.md) | warn | Disallow usage of setState in componentDidMount | 1.2M |
| [eslint/handle-callback-err](https://lintradar.dev/rules/eslint/handle-callback-err.md) | warn | Require error handling in callbacks | 1.2M |
| [eslint/no-mixed-requires](https://lintradar.dev/rules/eslint/no-mixed-requires.md) | warn | Disallow `require` calls to be mixed with regular variable declarations | 1.2M |
| [eslint/no-restricted-modules](https://lintradar.dev/rules/eslint/no-restricted-modules.md) | warn | Disallow specified modules when loaded by `require` | 1.2M |

---

Web page: https://lintradar.dev/presets/react-native. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
