mysticatea/eslint-plugin-node

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

Open

#101 建立於 2017年12月8日

在 GitHub 查看
 (1 留言) (3 反應) (0 負責人)JavaScript (186 fork)github user discovery
acceptedenhancementhelp wanted

倉庫指標

Star
 (956 star)
PR 合併指標
 (PR 指標待抓取)

描述

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?

貢獻者指南