Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-node-import

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-node-import

Disallow imports of built-in Node.js modules without the `node:` prefix

  • 1.0.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8.3K
increased by5.91%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-node-import

Disallow imports of built-in Node.js modules without the node: prefix

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-node-import:

npm install eslint-plugin-node-import --save-dev

Usage

Add node-import to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
	"plugins": ["node-import"]
}

Then configure the (only) rule under the rules section.

{
	"rules": {
		"node-import/prefer-node-protocol": 2
	}
}

Rules

🔧 Automatically fixable by the --fix CLI option.

Name                Description🔧
prefer-node-protocolPrefer using the node: protocol when importing Node.js builtin modules.🔧

Credits

This plugin is a composite of two different custom ESLint rules:

Licence

© 2023 Nikita Karamov
Licensed under the ISC License


This project is hosted on GitHub: https://github.com/kytta/eslint-plugin-node-import.git

Keywords

FAQs

Package last updated on 12 Sep 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