Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

eslint plugin to detect implicit dependencies

License

NotificationsYou must be signed in to change notification settings

jcoreio/eslint-plugin-implicit-dependencies

 
 

Repository files navigation

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 yourESLint configuration file. You can omit theeslint-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 defaultimplicit-dependencies will only look for dependencies in thedependencies 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:truepeer:trueoptional:true

Or if configuring with #"auto" data-snippet-clipboard-copy-content="rules: { '@jcoreio/implicit-dependencies/no-implicit': [ 'error', { peer: true, dev: true, optional: true } ]}">

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

You can ignore specific modules by adding anignore option:

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

About

eslint plugin to detect implicit dependencies

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript86.8%
  • TypeScript13.2%

[8]ページ先頭

©2009-2025 Movatter.jp