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 = {
settings: {
"import/resolver": {
typescript: {
project: [__dirname + "/tsconfig.json"],
},
exports: {
require: false,
browser: false,
conditions: [],
unsafe: false,
},
},
},
};
Credits and license