Add Setting to Enable JavaScript TypeChecking Checking in Implicit Projects#25116
Add Setting to Enable JavaScript TypeChecking Checking in Implicit Projects#25116mjbvz merged 3 commits intomicrosoft:masterfrom
Conversation
…ojects Fixes microsoft#25113 Adds new setting to enable js typechecking in implicit projects // cc @mhegazy
| "typescript.selectTypeScriptVersion.title": "Select TypeScript Version", | ||
| "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments" | ||
| "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments", | ||
| "javascript.implicitProjectConfig.checkJs": "Enable/disable type checking in loose JavaScript files that are not included in any jsconfig or tsconfig projects. Requires TypeScript >= 2.3.1." |
There was a problem hiding this comment.
I'm still not sure how to clearly express when this setting applies and when it does not
The setting applies only when a javascript file is not included in a JavaScript project as defined in a jsconfig or tsconfig. If the file is part of a project, the user must instead enable checkJs in the config file itself
@kieferrm Let me know if you have any suggestions here
There was a problem hiding this comment.
@mjbvz how about: "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >= 2.3.1." ?
There was a problem hiding this comment.
Much better. I'll make the change
| this.checkJs = this.readCheckJs(); | ||
|
|
||
| disposables.push(workspace.onDidChangeConfiguration(() => { | ||
| let oldLoggingLevel = this.tsServerLogLevel; |
There was a problem hiding this comment.
Managing config like this is becoming pretty old. I'll look into refactoring this logic to be clearer in another change
Fixes #25113
Adds new setting to enable js typechecking in implicit projects
// cc @mhegazy