How to use eslint-import-resolver-webpack - 2 common examples

To help you get started, we’ve selected a few eslint-import-resolver-webpack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elastic / kibana / packages / kbn-eslint-import-resolver-kibana / import_resolver_kibana.js View on Github external

  // only use the node resolver if the importRequest is a path, or is
  // a module request but not one that's probably a webpackShim. This
  // prevents false positives as webpackShims are likely to be resolved
  // to the node_modules directory by the node resolver, but we want
  // them to resolve to the actual shim
  if (isPathRequest || !isProbablyWebpackShim(importRequest, file)) {
    const nodeResult = tryNodeResolver(importRequest, file, config);
    if (nodeResult && nodeResult.found) {
      return nodeResult;

  return webpackResolver.resolve(importRequest, file, {
    config: webpackConfig,
github SectorLabs / babel-plugin-transform-named-imports / src / resolver.js View on Github external
resolveFile(importPath, source) {
        const cacheKey = importPath + source;
        const cachedResult = this.cache[cacheKey];
        if (cachedResult !== undefined) {
            return cachedResult;

        const result = resolver.resolve(importPath, source, {
            config: this.webpackConfig,
            'config-index': this.webpackConfigIndex,

        const resolvedPath = result.found ? result.path : null;
        this.cache[cacheKey] = resolvedPath;

        return resolvedPath;


Resolve paths to dependencies, given a webpack.config.js. Plugin for eslint-plugin-import.

Latest version published 1 year ago

Package Health Score

85 / 100
Full package analysis

Popular eslint-import-resolver-webpack functions