Socket
Socket
Sign inDemoInstall

eslint-import-resolver-node

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-import-resolver-node - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

.npmignore

16

index.js

@@ -5,13 +5,19 @@ var resolve = require('resolve')

exports.resolveImport = function resolveImport(source, file, config) {
if (resolve.isCore(source)) return null
exports.interfaceVersion = 2
return resolve.sync(source, opts(path.dirname(file), config))
exports.resolve = function (source, file, config) {
if (resolve.isCore(source)) return { found: true, path: null }
try {
return { found: true, path: resolve.sync(source, opts(file, config)) }
} catch (err) {
return { found: false }
}
}
function opts(basedir, config) {
function opts(file, config) {
return assign({},
config,
{
basedir: basedir,
// path.resolve will handle paths relative to CWD
basedir: path.dirname(path.resolve(file)),
packageFilter: packageFilter,

@@ -18,0 +24,0 @@

{
"name": "eslint-import-resolver-node",
"version": "0.1.1",
"version": "0.2.0",
"description": "Node default behavior import resolution plugin for eslint-plugin-import.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha"
},

@@ -29,3 +29,10 @@ "repository": {

"resolve": "^1.1.6"
},
"peerDependencies": {
"eslint-plugin-import": ">=1.4.0"
},
"devDependencies": {
"chai": "^3.4.1",
"mocha": "^2.3.4"
}
}
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