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

VSCode continues to display TypeScript errors when all TypeScript settings are disabled. #54691

Closed
dzrw opened this issue Jul 19, 2018 · 8 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) typescript Typescript support issues

Comments

@dzrw
Copy link

dzrw commented Jul 19, 2018

We do not use TypeScript in several of our projects, so we have attempted to disable TypeScript validation in our JavaScript files. However, VSCode displays TypeScript-related messages despite the settings instructing it not to do so.

Apparently this is a regression in the latest build because there was another long bug closed by @sandy081 about a similar issue back in March 2018 where the team appeared to have communicated that the ability to disable TypeScript was a feature that VScode supported.

  • VSCode Version: 1.25.1
  • OS Version: macOS 10.13.6

Steps to Reproduce:

  1. Launch with code --disable-extensions
  2. Open User Settings and configure it as per below.
  3. Create a new file
  4. Type import test from "path"
  5. Change the Language Mode to "JavaScript"
  6. Hover over the word test and observe the message `[ts] 'test' is declared but its value is never read' appears inside the tooltip.
  7. The expected behavior is that VSCode does not attempt to communicate TypeScript-related error messages when TypeScript validation is disabled.

User Settings for Step 2

    # Surely one of these will turn off all [ts] messages in tooltips!
    "typescript.validate.enable": false,
    "typescript.autoImportSuggestions.enabled": false,
    "typescript.check.npmIsInstalled": false,
    "typescript.format.enable": false,
    "typescript.format.insertSpaceAfterCommaDelimiter": false,
    "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
    "typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": false,
    "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
    "typescript.format.insertSpaceAfterSemicolonInForStatements": false,
    "typescript.format.insertSpaceBeforeAndAfterBinaryOperators": false,
    "typescript.quickSuggestionsForPaths": false,
    "typescript.reportStyleChecksAsWarnings": false,
    "typescript.showUnused": false,
    "typescript.suggestionActions.enabled": false,
    "typescript.tsc.autoDetect": "off",
    "typescript.updateImportsOnFileMove.enabled": "never",
    "tslint.enable": false

Does this issue occur when all extensions are disabled?: Yes

@vscodebot
Copy link

vscodebot bot commented Jul 19, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the typescript Typescript support issues label Jul 19, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Jul 19, 2018

Set the javascript version of this setting instead:

    "javascript.showUnused": false,

If you are in js files, use the javascript versions of those settings if they exist

@mjbvz mjbvz closed this as completed Jul 19, 2018
@mjbvz mjbvz added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Jul 19, 2018
@dzrw
Copy link
Author

dzrw commented Jul 19, 2018

@mjbvz No, that's not the fix. I work in JavaScript, and I would like JavaScript-related error messages. Did you read the bug report?

@mjbvz
Copy link
Contributor

mjbvz commented Jul 19, 2018

Yes. The TypeScript extension powers our javascript intellisense which is why you see [TS] in your js file. That only indicates what extension is providing that error

@dzrw
Copy link
Author

dzrw commented Jul 19, 2018

How does VSCode disambiguate TypeScript validations from JavaScript validations in the UX?

@mjbvz
Copy link
Contributor

mjbvz commented Jul 19, 2018

That's where the two versions of the settings come in: the typescript.* setting apply to typescript files specifically, while the javascript.* settings apply to javascript files. Behind the scenes both are powered by the typescript extension

@dzrw
Copy link
Author

dzrw commented Jul 19, 2018

Thank you, that's an explanation that I can bring back to the team and not have folks scratching their heads.

@ajelcocks
Copy link

I have spent several days trying to stop a tooltip prefixed with [ts] and now I find it is not a TypeScript error? I have been pulling my hair out scouring the web, setting every possible setting to false, rebuilding projects and workspaces.

Two days of frustration and wasted effort...because the IDE tells me a JavaScript message using a TypeScript prefix/indicator.

That is just awesome! Thank you so much.

Perhaps you could look into maybe making it a little less confusing and putting a different [prefix] there, like oh I don't know ..[js] or something similar?

@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

3 participants