Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 939 Bytes

no-use-entire-process-dot-env.md

File metadata and controls

31 lines (17 loc) · 939 Bytes

Disallow process.env as a value

When using the inline-environment-variables-webpack-plugin, it's not safe to use the entire process.env as a value, because the plugin only looks for and replaces uses of the properties within it.

This rule warns on uses of the entire process.env.

(This rule is different from the no-process-env rule, which discourages any use of process.env at all. This rule intends to encourage usses of specific properties within process.env.)

Rule Details

The following patterns are considered warnings:

/* eslint no-use-entire-process-dot-env */

env = process.env

The following patterns are not considered warnings:

/* eslint no-use-entire-process-dot-env */

FOO = process.env.FOO