eslint-plugin-no-node-env
v1.0.1
Published
Prevent usage of NODE_ENV
Downloads
1,582
Maintainers
Readme
eslint-plugin-no-node-env
Prevent usage of process.env.NODE_ENV
, which is probably not what you think it is. Read more context here.
Installation
npm install eslint-plugin-no-node-env --save-dev
Usage
Add no-node-env
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix. Then include the rule in the rules section:
{
"plugins": ["no-node-env"],
"rules": {
"no-node-env/no-node-env": "error"
}
}
To only apply this rule to a subdirectory, like src
, you can use the overrides
section of your ESLint configuration file.
{
"overrides": [
{
"plugins": ["no-node-env"],
"files": ["src/**"],
"rules": {
"no-node-env/no-node-env": "error"
}
}
]
}
Rules
| Name | | :--------------------------------------- | | no-node-env |