css-module-types icon indicating copy to clipboard operation
css-module-types copied to clipboard

TypeScript gets warnings mismatched when this plugin is active

Open jedrichards opened this issue 6 years ago • 4 comments
trafficstars

(Typescript version 3.3.3)

I'm not sure what's going on, TS Language Service plugins are new to me, but while this plugin is active TS seems to be getting errors muddled up and applied to the wrong lines.

Given these imports:

screenshot 2019-02-18 at 16 58 23

The warnings are coming out like this:

screenshot 2019-02-18 at 16 58 30

Note that the error about QueryItem is being applied to L11, which is the import for the CSS Module. And vice versa, the warning for the CSS Module is being applied to L12, which is the import for QueryItem.

Also note that the warning text seems to imply TS is trying to resolve the CSS Module types against the TS module, and vice versa. When I remove this plugin from tsconfig, these warnings go away. tsc is reporting no type errors either way.

Let me know if you'd like anymore information ...

jedrichards avatar Feb 18 '19 17:02 jedrichards

We have experiencing same issues with [email protected]. We had downgrade typscript to 3.3.1 to fix vscode highlights issue.

Also I see npm warnings on install:

warning " > [email protected]" has incorrect peer dependency "typescript@^2.2.1".

Please update to support latest typescript.

JustFly1984 avatar Mar 05 '19 21:03 JustFly1984

PS: For us this issue was found on Linux desktop only, in OSX it was looking fine

JustFly1984 avatar Mar 05 '19 21:03 JustFly1984

I'm on macOS here.

jedrichards avatar Mar 06 '19 12:03 jedrichards

Yeah, confirming it on MacOS too.

JustFly1984 avatar Mar 25 '19 00:03 JustFly1984