Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2305 - Fix VTI printing empty filenames #2306

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,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