ESLint Environment for React Native Globals

0.1.2 · abandoned · verified Sun Apr 19

eslint-plugin-react-native-globals is a lightweight ESLint plugin designed to provide an environment that acknowledges common React Native global variables and APIs. Its primary purpose is to prevent `no-undef` errors for built-in React Native globals (like `__DEV__`, `__dirname`, `__filename`, `process`, `global`, `console`, `setTimeout`, `setInterval`, etc.) without needing to disable the `no-undef` rule entirely. This allows developers to maintain strict linting for undefined variables while working with the React Native specific global scope. The package is currently at version `0.1.2`, with its last significant update occurring in 2019. Due to its age and lack of recent updates, it can be considered abandoned or in indefinite maintenance mode, with no predictable release cadence. Newer React Native versions might introduce globals not covered by this plugin.

Common errors

Warnings

Install

Imports

Quickstart

This configuration snippet shows how to integrate the plugin into your `.eslintrc` file.

{
  "plugins": [
    "react-native-globals"
  ],
  "env": {
    "react-native-globals/all": true
  },
  "rules": {
    // Example: Ensure no-undef is still active for non-React Native globals
    "no-undef": "error"
  }
}

view raw JSON →