Socket
Socket
Sign inDemoInstall

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.4.0 to 1.5.0

2

dist/helpers/create-fixer.js

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

var newPath = resolvedPath.replace(aliasPath, '');
var replacement = path.normalize(path.join(aliasMatch, newPath));
var replacement = path.normalize(path.join(aliasMatch, newPath)).replace(/\\/g, '/').replace(/\/c:/gi, '');
return function (fixer) {

@@ -64,0 +64,0 @@ return fixer.replaceTextRange([source.range[0] + 1, source.range[1] - 1], replacement);

"use strict";
var path = require('path');
function isAliasPath(resolvedPath, aliasPath) {
// Prevent replacing the path mid-word
return resolvedPath.endsWith(aliasPath) || resolvedPath.includes("".concat(aliasPath, "/"));
return resolvedPath.endsWith(aliasPath) || resolvedPath.includes("".concat(aliasPath).concat(path.sep));
}
module.exports = isAliasPath;
{
"name": "eslint-plugin-module-resolver",
"version": "1.4.0",
"version": "1.5.0",
"description": "Warn when using relative paths to modules aliased",

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

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