Skip to content

Commit

Permalink
feat: disable vue-tsc version checking by default
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Dec 18, 2022
1 parent 88245cc commit 88b70de
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
5 changes: 5 additions & 0 deletions extensions/vscode-vue-language-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@
"default": true,
"description": "Show known problems in status bar."
},
"volar.doctor.checkVueTsc": {
"type": "boolean",
"default": false,
"description": "Check vue-tsc version."
},
"volar.codeLens.scriptSetupTools": {
"type": "boolean",
"default": false,
Expand Down
22 changes: 12 additions & 10 deletions extensions/vscode-vue-language-features/src/features/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,18 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan
}

// check vue-tsc version same with extension version
const vueTscMod = getWorkspacePackageJson(fileUri.fsPath, 'vue-tsc');
if (vueTscMod && vueTscMod.json.version !== context.extension.packageJSON.version) {
problems.push({
title: 'Different `vue-tsc` version',
message: [
`The \`${context.extension.packageJSON.displayName}\`\'s version is \`${context.extension.packageJSON.version}\`, but the workspace\'s \`vue-tsc\` version is \`${vueTscMod.json.version}\`. This may produce different type checking behavior.`,
'',
'- vue-tsc: ' + vueTscMod.path,
].join('\n'),
});
if (vscode.workspace.getConfiguration('volar').get<boolean>('doctor.checkVueTsc')) {
const vueTscMod = getWorkspacePackageJson(fileUri.fsPath, 'vue-tsc');
if (vueTscMod && vueTscMod.json.version !== context.extension.packageJSON.version) {
problems.push({
title: 'Different `vue-tsc` version',
message: [
`The \`${context.extension.packageJSON.displayName}\`\'s version is \`${context.extension.packageJSON.version}\`, but the workspace\'s \`vue-tsc\` version is \`${vueTscMod.json.version}\`. This may produce different type checking behavior.`,
'',
'- vue-tsc: ' + vueTscMod.path,
].join('\n'),
});
}
}

// check @types/node > 18.8.0 && < 18.11.1
Expand Down

0 comments on commit 88b70de

Please sign in to comment.