microsoft / vscode-jshint

VSCode extension to integrate jshint into VSCode
https://marketplace.visualstudio.com/items?itemName=dbaeumer.jshint
MIT License
72 stars 48 forks source link

JSHint server should clear diagnostics on buffer clone #36

Closed dbaeumer closed 8 years ago

dbaeumer commented 8 years ago

We removed some bogus code for 1.3.x from the core which cleared markers on buffer close. We had to remove that to get to a consistent project build story. Now the producer of markers must ensure to clear them if they re not needed anymore (was the contract always)

If you don't do anything fancy you can use the following snippet: // Clear diagnostics on close. documents.onDidClose((event) => { connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] }); });

kieferrm commented 8 years ago

Closed with https://github.com/Microsoft/vscode-jshint/commit/57e85326b6a14cf8f18b81c87ab920880430441b.