From 6bf7a94c6b9dfd72f87f4dc074408a08e7be3cae Mon Sep 17 00:00:00 2001 From: Daniel Westendorf Date: Fri, 7 Oct 2022 08:04:55 -0600 Subject: [PATCH] Fix linting --- lib/authorization.js | 2 +- package.json | 2 +- test/helper.js | 1 - test/lib/authorization-test.js | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/authorization.js b/lib/authorization.js index ea361eb..12c36ef 100644 --- a/lib/authorization.js +++ b/lib/authorization.js @@ -10,7 +10,7 @@ module.exports = (options) => { } this.log('Validating Private Token...') - const authHeader = new String(req.get('Authorization')) + const authHeader = String(req.get('Authorization')) if (authHeader.replace(/Bearer (.*)$/i, '$1') !== this.options.privateToken) { this.log('Invalid Private Token') diff --git a/package.json b/package.json index 6d480c7..fa534b3 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ }, "scripts": { "test": "teenytest 'test/**/*-test.js' --helper test/helper.js", - "lint": "./node_modules/.bin/eslint.js lib/* test/* *.js", + "lint": "./node_modules/.bin/eslint lib/* test/* *.js", "testncov": "nyc --reporter=lcov --reporter=text teenytest 'test/**/*-test.js' --helper test/helper.js && ./node_modules/.bin/eslint *.js, **/**.js" }, "teenytest": { diff --git a/test/helper.js b/test/helper.js index dd7b62a..26e41b1 100644 --- a/test/helper.js +++ b/test/helper.js @@ -1,6 +1,5 @@ /* global td:true */ /* global server:true */ -const { spawn } = require('child_process') global.td = require('testdouble') diff --git a/test/lib/authorization-test.js b/test/lib/authorization-test.js index 938242a..2f6b9c8 100644 --- a/test/lib/authorization-test.js +++ b/test/lib/authorization-test.js @@ -1,5 +1,3 @@ -const assert = require('assert') - const Authorization = require('../../lib/authorization') let requestToken = '123456'