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

declare module and import/no-unresolved #197

Closed
nathanhannig opened this issue Nov 3, 2022 · 4 comments
Closed

declare module and import/no-unresolved #197

nathanhannig opened this issue Nov 3, 2022 · 4 comments

Comments

@nathanhannig
Copy link

I am using the module '@types/arcgis-js-api' which uses declare module

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/arcgis-js-api/v3/index.d.ts

import Portal from "esri/arcgis/Portal";

When using eslint-plugin-import with eslint-import-resolver-typescript I get
error Unable to resolve path to module 'esri/arcgis/Portal' import/no-unresolved

How can I set up to resolve this properly?

@nathanhannig nathanhannig changed the title declare module and import/no-unresolved` declare module and import/no-unresolved Nov 3, 2022
@Pixcell
Copy link

Pixcell commented Dec 12, 2022

No update on this?
I'm facing the same issue with the $env/static/public module defined by sveltekit

@linonetwo
Copy link

I have a declare module for tiddlywiki

declare module '$:/core/modules/widgets/widget.js' {
  import { Widget } from 'tiddlywiki';
  export { Widget as widget };
}

And use it like import { widget as Widget } from '$:/core/modules/widgets/widget.js';

Now I have to use 'import/no-unresolved': [2, { ignore: ['\\$:/'] }], to ignore it.

@linonetwo
Copy link

Shit, I have encountered this before! Wasting time dealing with this every time.

@JounQin
Copy link
Collaborator

JounQin commented Dec 6, 2023

Duplicate of #261

@JounQin JounQin closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants