You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// foo.tsexportconstfoo="foo"// index.tsasyncfunctiontest(){const{ foo }=awaitimport("./foo")constfoo2=awaitimport("./foo").then(mod=>mod.foo)constmod=awaitimport("./foo")// should mark all non-type exports as used}
exported declaration 'foo' not used within other modules
Config:
{"extends": ["plugin:import/recommended","plugin:import/typescript",// and more ...],"rules": {"import/no-unused-modules": ["error",{"unusedExports": true}],},}
This was intentional during the design of the rule (#1142, cc @rfermann).
When a dynamic import is done with a static, hardcoded path, it does seem possible for this plugin to detect it, but it would have to ignore any other forms of import(). A PR that detects these would be appreciated.
Repro:
My specific use case is:
Config:
Versions:
The text was updated successfully, but these errors were encountered: