From 22ceaf462907de1f67042b82bf6076cccfcd4bff Mon Sep 17 00:00:00 2001 From: jaxonL <11150920+jaxonL@users.noreply.github.com> Date: Fri, 21 Oct 2022 17:56:37 -0400 Subject: [PATCH 1/2] docs: add clarity to doctor.ts text; fix typos --- .../src/features/doctor.ts | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/extensions/vscode-vue-language-features/src/features/doctor.ts b/extensions/vscode-vue-language-features/src/features/doctor.ts index c609488b5..fa5bc98b0 100644 --- a/extensions/vscode-vue-language-features/src/features/doctor.ts +++ b/extensions/vscode-vue-language-features/src/features/doctor.ts @@ -41,7 +41,7 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan } content += '---\n\n'; - content += `> Have question about the report message? You can see how it judge by inspecting the [source code](https://github.com/johnsoncodehk/volar/blob/master/extensions/vscode-vue-language-features/src/features/doctor.ts).\n\n`; + content += `> Have any questions about the report message? You can see how it is composed by inspecting the [source code](https://github.com/johnsoncodehk/volar/blob/master/extensions/vscode-vue-language-features/src/features/doctor.ts).\n\n`; return content.trim(); } @@ -100,7 +100,7 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan if (!vueMod) { problems.push({ title: '`vue` module not found', - message: 'Vue module not found from workspace, you may have not install `node_modules` yet.', + message: 'Vue module not found from workspace; you may not have installed `node_modules` yet.', }); } @@ -109,7 +109,7 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan const vueVersionNumber = semver.gte(vueMod.json.version, '3.0.0') ? 3 : semver.gte(vueMod.json.version, '2.7.0') ? 2.7 : 2; const targetVersionNumber = vueOptions?.target ?? 3; const lines = [ - `Target version not match, you can specify the target version in \`vueCompilerOptions.target\` in tsconfig.json / jsconfig.json. (expected \`"target": ${vueVersionNumber}\`)`, + `Target version mismatch. You can specify the target version in \`vueCompilerOptions.target\` in tsconfig.json / jsconfig.json. (Expected \`"target": ${vueVersionNumber}\`)`, '', '- vue version: ' + vueMod.json.version, '- tsconfig target: ' + targetVersionNumber + (vueOptions?.target !== undefined ? '' : ' (default)'), @@ -133,7 +133,7 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan problems.push({ title: '`@vue/compiler-dom` missing for Vue 2', message: [ - 'Vue 2 do not have JSX types definition, so template type checkinng cannot working correctly, you can install `@vue/compiler-dom` by add it to `devDependencies` to resolve this problem.', + 'Vue 2 does not have JSX types definitions, so template type checking will not work correctly. You can resolve this problem by installing `@vue/compiler-dom` and adding it to your project\'s `devDependencies`.', '', '- vue: ' + vueMod.path, ].join('\n'), @@ -143,9 +143,9 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan // check vue version >= 2.7 and < 3 but installed @vue/compiler-dom if (vueMod && semver.gte(vueMod.json.version, '2.7.0') && semver.lt(vueMod.json.version, '3.0.0') && domMod) { problems.push({ - title: 'Do not need `@vue/compiler-dom`', + title: 'Unnecessary `@vue/compiler-dom`', message: [ - 'Vue 2.7 already included JSX types definition, you can remove `@vue/compiler-dom` depend from package.json.', + 'Vue 2.7 already includes JSX type definitions. You can remove the `@vue/compiler-dom` dependency from package.json.', '', '- vue: ' + vueMod.path, '- @vue/compiler-dom: ' + domMod.path, @@ -157,9 +157,9 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan const vueTscMod = getWorkspacePackageJson(fileUri.fsPath, 'vue-tsc'); if (vueTscMod && vueTscMod.json.version !== context.extension.packageJSON.version) { problems.push({ - title: '`vue-tsc` version different', + title: 'Different `vue-tsc` different', message: [ - `The \`${context.extension.packageJSON.displayName}\` version is \`${context.extension.packageJSON.version}\`, but workspace \`vue-tsc\` version is \`${vueTscMod.json.version}\`, there may have different type checking behavior.`, + `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'), @@ -170,9 +170,9 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan const typesNodeMod = getWorkspacePackageJson(fileUri.fsPath, '@types/node'); if (typesNodeMod && semver.gte(typesNodeMod.json.version, '18.8.1') && semver.lte(typesNodeMod.json.version, '18.11.0')) { problems.push({ - title: '`@types/node` version incompatible', + title: 'Incompatible `@types/node` version', message: [ - '`@types/node` version `' + typesNodeMod.json.version + '` is incompatible to Vue, it will cause DOM event type broken in template.', + '`@types/node`\'s version `' + typesNodeMod.json.version + '` is incompatible with Vue. It will cause broken DOM event types in template.', '', 'You can update `@types/node` to `18.11.1` or later to resolve.', '', @@ -187,7 +187,7 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan if (vetur?.isActive) { problems.push({ title: 'Use @volar-plugins/vetur instead of Vetur', - message: 'Detected Vetur enabled, you might consider disabling it and use [@volar-plugins/vetur](https://github.com/johnsoncodehk/volar-plugins/tree/master/packages/vetur) instead of.', + message: 'Detected Vetur enabled. Consider disabling Vetur and use [@volar-plugins/vetur](https://github.com/johnsoncodehk/volar-plugins/tree/master/packages/vetur) instead.', }); } @@ -199,7 +199,7 @@ export async function register(context: vscode.ExtensionContext, client: BaseLan problems.push({ title: '`@volar/vue-language-plugin-pug` missing', message: [ - 'For `