New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-no-node-env

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-no-node-env

Prevent usage of NODE_ENV

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 16 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc