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

@jcoreio/eslint-plugin-implicit-dependencies

Package Overview
Dependencies
Maintainers
7
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jcoreio/eslint-plugin-implicit-dependencies

eslint plugin to detect implicit dependencies

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
865
decreased by-4.63%
Maintainers
7
Weekly downloads
 
Created
Source

@jcoreio/eslint-plugin-implicit-dependencies

eslint plugin to detect implicit dependencies

Detects when a module has been 'require'd or 'import'ed that is not listed as a dependency in the project's package.json.

This helps prevent accidentally depending on a module that is present in node_modules as a result of being installed further down your dependency tree, but is not listed as an explicit dependency of your project.

Usage

Add @jcoreio/eslint-plugin-implicit-dependencies to the plugins section of your ESLint configuration file. You can omit the eslint-plugin- prefix:

plugins:
  - @jcoreio/eslint-plugin-implicit-dependencies

Then configure the plugin under the rules section.

rules:
  - @jcoreio/implicit-dependencies/no-implicit: error

Options

By default implicit-dependencies will only look for dependencies in the dependencies section of your package.json. You can include dev, peer and optional dependencies by configuring the rule to include those sections as follows:

rules:
  - @jcoreio/implicit-dependencies/no-implicit:
      - error
      - dev: true
        peer: true
        optional: true

Or if configuring with javascript:

rules: {
  '@jcoreio/implicit-dependencies/no-implicit': [
    'error',
    { peer: true, dev: true, optional: true }
  ]
}

You can ignore specific modules by adding an ignore option:

rules:
  - @jcoreio/implicit-dependencies/no-implicit:
      - error
      - ignore:
          - vscode

Keywords

FAQs

Package last updated on 19 Mar 2024

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