Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@putout/plugin-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/plugin-nodejs

putout plugin adds ability to transform code to new API of Node.js

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
17K
23.04%
Maintainers
1
Weekly downloads
 
Created
Source

@putout/plugin-nodejs NPM version Dependency Status

putout plugin adds ability to transform to new nodejs.org API and best practices.

Install

npm i putout @putout/plugin-nodejs -D

Rules

{
    "rules": {
        "nodejs/convert-fs-promises": "on"
    }
}

convert-fs-promises

Convert fs.promises into form that will be simpler to use and convert from in ESM to:

import {readFile} from 'fs/promises';

❌ Incorrect code example

const {readFile} = require('fs').promises;

✅ Correct code Example

const {readFile} = require('fs/promises');

License

MIT

Keywords

putout

FAQs

Package last updated on 08 Jan 2021

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