Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import-x/namespace rule not detecting "toBuffer" in bwip-js #89

Open
noahnu opened this issue Jun 5, 2024 · 1 comment
Open

import-x/namespace rule not detecting "toBuffer" in bwip-js #89

noahnu opened this issue Jun 5, 2024 · 1 comment

Comments

@noahnu
Copy link

noahnu commented Jun 5, 2024

I'm using https://github.com/metafloor/bwip-js like so:

import * as bwipjs from 'bwip-js';

bwipjs.toBuffer({})

In VSCode, I see this tooltip/intellisense:

image

toBuffer is defined in the declaration file:

image

https://github.com/metafloor/bwip-js/blob/master/dist/bwip-js-node.d.ts#L192

"toBuffer" is only available in the node declaration, so I suspect this might be a case of the wrong declaration file being loaded. The bwip-js project uses package.json exports.

Environment

@SukkaW
Copy link
Collaborator

SukkaW commented Jul 6, 2024

This looks like an eslint-import-resolver-typescript issue, where conditionNames includes both node and browser: https://github.com/import-js/eslint-import-resolver-typescript#conditionnames

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants