You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

eslint-import-resolver-nuxt

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version

to
0.1.5

10

index.js

@@ -7,5 +7,5 @@ const resolve = require('resolve');

exports.resolve = function (source, file, config) {
const trimmedSouce = trimResourceQuery(source)
log('Resolving: ', trimmedSouce, 'from:', file);
const realSource = parseSource(trimmedSouce, config && config.nuxtSrcDir);
const trimmedSource = trimResourceQuery(source)
log('Resolving: ', trimmedSource, 'from:', file);
const realSource = parseSource(trimmedSource, config && config.nuxtSrcDir, config && config.rootDir);

@@ -35,4 +35,4 @@ if (resolve.isCore(realSource)) {

function parseSource(source, srcDir) {
const nuxtSrcDir = path.join(process.cwd(), srcDir || '');
function parseSource(source, srcDir, rootDir) {
const nuxtSrcDir = path.join(rootDir || process.cwd(), srcDir || '');
const nuxtAliasRe = /^~|@(assets|components|pages|plugins|static|store)?\/.+/;

@@ -39,0 +39,0 @@ const nuxtFileAlias = ['~store', '~router', '@store', '@router'];

{
"name": "eslint-import-resolver-nuxt",
"version": "0.1.4",
"version": "0.1.5",
"description": "Nodejs and nuxtjs default behavior import resolution plugin for eslint-plugin-import.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -28,5 +28,11 @@ # eslint-import-resolver-nuxt

nuxt:
# The path of nuxt resource directory to relative process.cwd()
# The path of project root
# Useful if your project is part of a monorepo with multiple packages
# if unset, default is process.cwd()
rootDir: nuxt
# The path of nuxt resource directory to relative rootDir
# if unset, default is ''
nuxtSrcDir: nuxt
extensions:

@@ -33,0 +39,0 @@ # if unset, default is just '.js', but it must be re-added explicitly if set