1.0.1 • Published 1 year ago

eslint-plugin-no-node-env v1.0.1

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

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
1.0.1

1 year ago

1.0.0

1 year ago