0.0.1 • Published 1 month ago

eslint-plugin-expo v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

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"
  }
}

Rules

NameDescription
no-dynamic-env-varPrevents process.env from being accessed dynamically
no-env-var-destructuringDisallow desctructuring of environment variables