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

disableNoUnusedVariableRule: false breaks import lookups #72

Closed
winston01 opened this issue Jun 13, 2018 · 1 comment
Closed

disableNoUnusedVariableRule: false breaks import lookups #72

winston01 opened this issue Jun 13, 2018 · 1 comment

Comments

@winston01
Copy link

winston01 commented Jun 13, 2018

Hi

(I'm not sure if I should open this issue here or in vscode-ts-tslint.)

I recently installed vscode-ts-tslint (v0.0.7) in place of vscode-tslint, and I set "disableNoUnusedVariableRule": false in the tsconfig.json for tslint-language-service. I noticed that in this case the import lookups (including the auto-import) are broken. If I set this rule to true, or remove it from the config, lookups work again.

VSCode version: 1.24.0 (bug was the same with previous version too)

Let me know if you need further details.

UPDATE:

Apparently this happens to modules without type definition. See an example setup in this repo:
https://github.com/winston01/vscode-ts-tslint-no-unused-test

Here you can see that for example minimist (w/ a type definition) is recognized correctly, but moment (w/o type def.) is not. If you comment out "disableNoUnusedVariableRule": false in the tsconfig.json and reload the settings, you'll see that moment works too.

@winston01
Copy link
Author

Apparently it's related to this issue pending since a long while:

palantir/tslint#2649

Closed.

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

1 participant