# noReactNativeDeepImports

Rule `biome/noReactNativeDeepImports`. Disallow deep imports from the `react-native` package.

- Source: biome
- Technologies: React
- Kind: suspicious
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #536 by reach, #171 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `suspicious/noReactNativeDeepImports` | yes | no | group suspicious, since 2.4.13 | [docs](https://biomejs.dev/linter/rules/no-react-native-deep-imports/) |

## Code examples

### Incorrect: the rule reports this

```js
import View from "react-native/Libraries/Components/View/View";
```

```js
const Platform = require("react-native/Libraries/Utilities/Platform");
```

```js
const View = require("react-native/Libraries/Components/View/View");
```

### Correct: the rule accepts this

```js
import { View } from "react-native";
```

```js
const { Platform } = require("react-native");
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noReactNativeDeepImports": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noQwikUseVisibleTask](https://lintradar.dev/rules/biome/noQwikUseVisibleTask.md): Disallow `useVisibleTask$()` functions in Qwik components.
- [biome/noReactNativeRawText](https://lintradar.dev/rules/biome/noReactNativeRawText.md): Disallow raw text outside `<Text>` components in React Native.
- [biome/noQuickfixBiome](https://lintradar.dev/rules/biome/noQuickfixBiome.md): Disallow `quickfix.biome` in supported editor settings.
- [biome/noReactSpecificProps](https://lintradar.dev/rules/biome/noReactSpecificProps.md): Prevents React-specific JSX properties from being used.
- [biome/noPlaywrightUnsafeReferences](https://lintradar.dev/rules/biome/noPlaywrightUnsafeReferences.md): Disallow using variables from outside the function passed to `page.evaluate()` and `page.addInitScript()`.
- [biome/noRedundantUseStrict](https://lintradar.dev/rules/biome/noRedundantUseStrict.md): Prevents from having redundant `"use strict"`.

---

Web page: https://lintradar.dev/rules/biome/noReactNativeDeepImports. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
