enable rule to warn about Buffer constructor usage #7197
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
As part of testing the rebase flow I kept noticing this warning from within the Dev Tools:
This was a warning from our upgrade to Electron 3 (that now uses Node 10) about some API changes in Node core.
Description
Some of the
Buffer
constructor APIs have been deprecated since Node 10.0 and will likely be removed at a later date:The reasons why have been outlined in nodejs/node#4660 and a more in-depth writeup in https://github.com/ChALkeR/notes/blob/master/Lets-fix-Buffer-API.md.
It's not something that is keeping me awake at night currently, but seeing it on every launch while I test locally in dev tools has annoyed me enough to address it.
I've enabled the
no-buffer-constructor
eslint to find anywhere we use this API in the codebase, and I plan to clean these up the violations by swapping them to the recommend APIs.Release notes
Notes: no-notes