Socket
Socket
Sign inDemoInstall

@putout/plugin-merge-duplicate-imports

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @putout/plugin-merge-duplicate-imports

🐊Putout plugin adds ability to merge duplicate-imports


Version published
Weekly downloads
16K
decreased by-14.05%
Maintainers
1
Install size
10.0 kB
Created
Weekly downloads
 

Readme

Source

@putout/plugin-merge-duplicate-imports NPM version

The static import statement is used to import read only live bindings which are exported by another module.

(c) MDN

🐊Putout plugin adds ability to find and merge duplicate imports.

Install

npm i @putout/plugin-merge-duplicate-imports
{
    "rules": {
        "merge-duplicate-imports/join": "on",
        "merge-duplicate-imports/rename": "on"
    }
}

join

❌ Example of incorrect code

import test from 'supertape';
import {stub} from 'supertape';

✅ Example of correct code

import test, {stub} from 'supertape';

rename

Checkout in 🐊Putout Editor.

❌ Example of incorrect code

import putout from './putout.js';
import all from './putout.js';
import x from './putout.js';

console.log(all);
console.log(x);

✅ Example of correct code

import putout from './putout.js';

console.log(putout);
console.log(putout);

License

MIT

FAQs

Last updated on 09 Jan 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc