Skip to content

Commit

Permalink
Merge pull request #2306 from andrewisaburden/PR-2305-fix-empty-filen…
Browse files Browse the repository at this point in the history
…ame-print-VTI

2305 - Fix VTI printing empty filenames
  • Loading branch information
octref authored Oct 27, 2020
2 parents 1d73030 + 8dcb65b commit 9cc4943
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
12 changes: 5 additions & 7 deletions vti/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit 9cc4943

Please sign in to comment.