diff --git a/CHANGELOG.md b/CHANGELOG.md index b4b800b1a0..399748d59f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Make `prettier` default formatter for HTML as prettyhtml is no longer actively maintained. #2291. - Load prettier plugin from VLS if not present in workspace folder. #2014. - Cross file template type checking - check that components are passed props with the correct types. #1596 and #2294. +- 🙌 Fix VTI printing filenames without errors or warnings due to eslint-plugin-vue being igored. Thanks to contribution from [@andrewisaburden](https://github.com/andrewisaburden). #2305. ### 0.27.3 | 2020-09-13 | [VSIX](https://marketplace.visualstudio.com/_apis/public/gallery/publishers/octref/vsextensions/vetur/0.27.3/vspackage) diff --git a/vti/src/cli.ts b/vti/src/cli.ts index 5b0f5803aa..d04d52d222 100644 --- a/vti/src/cli.ts +++ b/vti/src/cli.ts @@ -99,18 +99,16 @@ async function getDiagnostics(workspaceUri: URI) { }); try { - const res = (await clientConnection.sendRequest('$/getDiagnostics', { + let res = (await clientConnection.sendRequest('$/getDiagnostics', { uri: URI.file(absFilePath).toString() })) as Diagnostic[]; + /** + * Ignore eslint errors for now + */ + res = res.filter(r => r.source !== 'eslint-plugin-vue'); if (res.length > 0) { console.log(`${chalk.green('File')} : ${chalk.green(absFilePath)}`); res.forEach(d => { - /** - * Ignore eslint errors for now - */ - if (d.source === 'eslint-plugin-vue') { - return; - } if (d.severity === DiagnosticSeverity.Error) { console.log(`${chalk.red('Error')}: ${d.message.trim()}`); errCount++;