Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

cyco130/eslint-import-resolver-exports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️LOOKING FOR A MAINTAINER⚠️

I'm not maintaining this package anymore because I have no time and eslint-import-resolver-typescript meets my needs. Contact me (cyco130) on Discord or Twitter if you're interested.

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

About

package.json#exports resolver for eslint-plugin-import

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published