Skip to content

Commit

Permalink
chore(scripts): remove redundant export
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Mar 16, 2023
1 parent d7ac237 commit 0651021
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions scripts/license-checker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable security/detect-object-injection */
/* eslint-disable security-node/detect-crlf */
/* eslint-disable security/detect-object-injection */
const checker = require("license-checker");
const copyLeftLicenses = require("spdx-copyleft");
const { promisify } = require("util");
Expand All @@ -11,12 +11,8 @@ const path = require("upath");
* @author Frazer Smith
* @description Check licenses of all direct production dependencies to
* ensure they are not copyleft.
* @param {object} options - Options object.
* @param {string} [options.start="__dirname/.."] - Path to start checking from.
*/
async function checkLicenses(
options = { start: path.joinSafe(__dirname, "..") }
) {
async function checkLicenses() {
console.log("Checking licenses of direct production dependencies...");

/**
Expand Down Expand Up @@ -57,7 +53,7 @@ async function checkLicenses(
const licenses = await init({
direct: true,
production: true,
start: options.start,
start: path.joinSafe(__dirname, ".."),
});

const copyLeftLicensesList = Object.keys(licenses).filter((license) =>
Expand All @@ -77,9 +73,4 @@ async function checkLicenses(
process.exit(0);
}

// If file called directly, then run function
if (require.main === module) {
checkLicenses();
}

module.exports = checkLicenses;
checkLicenses();

0 comments on commit 0651021

Please sign in to comment.