JSPM

eslint-plugin-expo

1.0.1-canary-20251031-b135dff
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 661199
  • Score
    100M100P100Q174776F
  • License MIT

ESLint rules for Expo apps

Package Exports

  • eslint-plugin-expo
  • eslint-plugin-expo/build/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-expo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

eslint-plugin-expo

ESLint rules for Expo apps

Installation

You'll first need to install ESLint:

npx expo install eslint --save-dev

Next, install eslint-plugin-expo:

npx expo install eslint-plugin-expo --save-dev

Usage

Add expo to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": [
    "expo"
  ]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "expo/no-env-var-destructuring": "error",
    "expo/no-dynamic-env-var": "error",
    "expo/use-dom-exports": "error",
    "expo/prefer-box-shadow": "warn",
  }
}

Rules

Name Description
no-dynamic-env-var Prevents process.env from being accessed dynamically
no-env-var-destructuring Disallow destructuring of environment variables
use-dom-exports Enforce using DOM exports from react-native-web
prefer-box-shadow Suggest using box-shadow instead of shadowColor/shadowOffset/shadowOpacity/shadowRadius