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
With 0.9.9 released, I've finally got around to replacing my local workaround for #58 with the proper fix - turning on mockTypeScriptVersion.
Unfortunately this results in almost every variable being incorrectly flagged as failing the no-shadow-variable rule. That's ~58000 errors in the project I'm working on. This is something I didn't see when testing the original PR, so I'm not sure what's changed.
To reproduce:
Set up tslint-language-service in Visual Studio 2017 with TypeScript Tools for Microsoft Visual Studio installed
Make sure the typescript version in the project's node_modules is different to the one included in the VS TypeScript Tooling
Turn on the mockTypeScriptVersion option in the plugin
Open a TS file in VS
This should result in most variables (especially any imports or exports) being flagged as shadowing themselves.
It looks like this is caused by loading tslint twice (require then mockRequire.reRequire), though I'm not sure why this is the case.
The text was updated successfully, but these errors were encountered:
andyrooger
pushed a commit
to andyrooger/tslint-language-service
that referenced
this issue
Apr 16, 2018
andyrooger
changed the title
Incorrect no-shadow-variable failures when using mockTypeScriptVersion
Incorrect no-shadow-variable failures when using mockTypeScriptVersion
Apr 16, 2018
With 0.9.9 released, I've finally got around to replacing my local workaround for #58 with the proper fix - turning on
mockTypeScriptVersion
.Unfortunately this results in almost every variable being incorrectly flagged as failing the
no-shadow-variable
rule. That's ~58000 errors in the project I'm working on. This is something I didn't see when testing the original PR, so I'm not sure what's changed.To reproduce:
tslint-language-service
in Visual Studio 2017 with TypeScript Tools for Microsoft Visual Studio installedmockTypeScriptVersion
option in the pluginThis should result in most variables (especially any imports or exports) being flagged as shadowing themselves.
It looks like this is caused by loading tslint twice (
require
thenmockRequire.reRequire
), though I'm not sure why this is the case.The text was updated successfully, but these errors were encountered: