Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-module-resolver

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-module-resolver - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

20

dist/rules/use-alias.js

@@ -15,3 +15,3 @@ "use strict";

var findBabelConfig = require('find-babel-config');
var babel = require('@babel/core');

@@ -81,19 +81,17 @@ var path = require('path');

var alias = {};
var babelDir = projectRootAbsolutePath || '.';
var partialConfig = babel.loadPartialConfig();
var configOptions = partialConfig.options;
var _findBabelConfig$sync = findBabelConfig.sync(babelDir),
config = _findBabelConfig$sync.config;
try {
var validPluginNames = new Set(['babel-plugin-module-resolver', 'module-resolver']);
var _config$plugins$filte = config.plugins.filter(function (plugins) {
if (Array.isArray(plugins) && validPluginNames.has(plugins[0])) {
return plugins;
var _configOptions$plugin = configOptions.plugins.filter(function (plugin) {
if (validPluginNames.has(plugin.file && plugin.file.request)) {
return plugin;
}
}),
_config$plugins$filte2 = _slicedToArray(_config$plugins$filte, 1),
moduleResolver = _config$plugins$filte2[0];
_configOptions$plugin2 = _slicedToArray(_configOptions$plugin, 1),
moduleResolver = _configOptions$plugin2[0];
alias = moduleResolver[1].alias || {};
alias = moduleResolver.options.alias || {};
} catch (error) {

@@ -100,0 +98,0 @@ var message = 'Unable to find config for babel-plugin-module-resolver';

{
"name": "eslint-plugin-module-resolver",
"version": "1.0.0",
"version": "1.1.0",
"description": "Warn when using relative paths to modules aliased",

@@ -40,5 +40,2 @@ "repository": "HeroProtagonist/eslint-plugin-module-resolver",

},
"dependencies": {
"find-babel-config": "^1.2.0"
},
"devDependencies": {

@@ -45,0 +42,0 @@ "@babel/cli": "^7.7.7",

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