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

eslint-import-resolver-exports

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-import-resolver-exports

`package.json` `exports` field resolver for `eslint-plugin-import`

  • 1.0.0-beta.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
49K
decreased by-40.03%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-import-resolver-exports

This package adds package.json#exports support to eslint-plugin-import using the resolve.exports package.

Usage

Install with npm install -D eslint-import-resolver-exports and add it as a resolver to your ESLint configuration. You should always include another resolver (e.g. eslint-import-resolver-node or eslint-import-resolver-typescript) since this resolver only supports package.json#exports and not the other Node.js resolution features.

Example config:

module.exports = {
  // ... other configuration options
  settings: {
    "import/resolver": {
      typescript: {
        project: [__dirname + "/tsconfig.json"],
      },
      exports: {
        // Accepts the same options as the `resolve.exports` package
        // See: https://github.com/lukeed/resolve.exports#optionsunsafe

        // All optional, default values are shown

        // Add "require" field to the conditions
        require: false,
        // Add "browser" field to the conditions
        browser: false,
        // List of additional/custom conditions
        conditions: [],
        // Ignore everything except the `conditions` option
        unsafe: false,
      },
    },
  },
};

Credits and license

  • By Fatih Aygün under MIT license

FAQs

Package last updated on 24 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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