diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -50,7 +50,7 @@ GitHubPublisher.prototype.putRequest = function (path, data) {
 };
 
 GitHubPublisher.prototype.base64 = function (text) {
-  const data = text instanceof Buffer ? text : new Buffer(text);
+  const data = text instanceof Buffer ? text : Buffer.from(text);
   return data.toString('base64');
 };
 
diff --git a/test/github.spec.js b/test/github.spec.js
index <HASH>..<HASH> 100644
--- a/test/github.spec.js
+++ b/test/github.spec.js
@@ -171,7 +171,7 @@ describe('Formatter', function () {
     });
 
     it('should accept raw buffers as content', function () {
-      const contentBuffer = new Buffer('abc123');
+      const contentBuffer = Buffer.from('abc123');
 
       const mock = nock('https://api.github.com/')
         .put(path, {
Fix errors found through new linting