mysticatea/eslint-plugin-node

Rule to ensure `process.env.NODE_ENV` is only equality-tested against valid values

Open

#101 aberto em 8 de dez. de 2017

Ver no GitHub
 (1 comment) (3 reactions) (0 assignees)JavaScript (186 forks)github user discovery
acceptedenhancementhelp wanted

Métricas do repositório

Stars
 (956 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

I want to make sure that no one accidentally uses a condition in their code like process.env.NODE_ENV !== 'productn'.

The rule would error if process.env.NODE_ENV is equality-tested, or inequality-tested, against a value that is not a literal string of one of the allowed values. Allowed values could default to the conventional 'development' and 'production', and could be configured by the user.

Thoughts? Should I go ahead with a PR?

Guia do colaborador