microsoft / vscode-htmlhint

VS Code integration of HTMLHint, an HTML linter.
MIT License
50 stars 35 forks source link

Fix for error: Header must provide a Content-Length property #81

Closed aeschli closed 3 years ago

aeschli commented 3 years ago

Fixes #80

HTMLHint uses stdin/stdout to talk to the language server. Since a few releases, the node version we use in VSCode emits [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead interfering with the LS messages and causing the LS initialization to fail.

The simplest fix is to switch to use IPC.

The LS version used is quite old. @mike-kaufman If you're interested I can add a commit to update to the latest version. I believe the latest version of the LS also no longer references Buffer().

mike-kaufman commented 3 years ago

@aeschli - thanks so much for this. Would love to get this extension updated to more recent APIs, so if you want to open a PR for that, that would be very much appreciated. I briefly started looking at this last week, and got things to where I see a number of typescript errors, but I just don't have the cycles right now to put into this.