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 - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

6

package.json
{
"name": "@jcoreio/eslint-plugin-implicit-dependencies",
"version": "1.0.2",
"version": "1.1.0",
"description": "eslint plugin to detect implicit dependencies",

@@ -21,3 +21,5 @@ "repository": {

"@babel/runtime": "^7.18.6",
"pkg-up": "^3.1.0"
"@types/validate-npm-package-name": "^4.0.2",
"pkg-up": "^3.1.0",
"validate-npm-package-name": "^5.0.0"
},

@@ -24,0 +26,0 @@ "main": "./index.js",

@@ -48,1 +48,11 @@ # @jcoreio/eslint-plugin-implicit-dependencies

```
You can ignore specific modules by adding an `ignore` option:
```yaml
rules:
- @jcoreio/implicit-dependencies/no-implicit:
- error
- ignore:
- vscode
```

@@ -12,2 +12,3 @@ "use strict";

var _module = require("module");
var _validateNpmPackageName = _interopRequireDefault(require("validate-npm-package-name"));
var builtin = new Set(_module.builtinModules);

@@ -27,2 +28,8 @@ var _default = exports["default"] = {

type: 'boolean'
},
ignore: {
type: 'array',
items: {
type: 'string'
}
}

@@ -45,3 +52,5 @@ },

// ignore dynamic arguments
if (!name || typeof name !== 'string' || name === pkg.name || name[0] === '.' || name[0] === '/' || name.startsWith('node:')) {
if (!name || typeof name !== 'string' || name === pkg.name || name[0] === '.' || name[0] === '/' || name[0] === '!' ||
// ignore webpack magic
name.startsWith('node:')) {
return;

@@ -56,2 +65,6 @@ }

}
// if not a valid npm package name then skip
if (!(0, _validateNpmPackageName["default"])(moduleName).validForNewPackages) {
return;
}
// if module is a node core module then skip

@@ -64,4 +77,6 @@ if (builtin.has(moduleName)) {

var opts = context.options[0] || {};
if (pkg.dependencies && pkg.dependencies[moduleName]) {
if (opts.ignore && opts.ignore.includes(moduleName)) {
return;
} else if (pkg.dependencies && pkg.dependencies[moduleName]) {
return;
} else if ((_pkg$optionalDependen = pkg.optionalDependencies) !== null && _pkg$optionalDependen !== void 0 && _pkg$optionalDependen[moduleName] && opts.optional) {

@@ -68,0 +83,0 @@ return;

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