commit 7cf930f71855e793dca890ef97f335b874bdadf5
parent 4822dfca23fd803af194e1f470299de4b6bbdf73
Author: Gavin Rehkemper <gavinr@users.noreply.github.com>
Date: Fri, 29 Oct 2021 16:50:11 -0500
Merge pull request #63 from gavinr/eslint-fixes
chore(linting): fix eslint warnings for var/const
Diffstat:
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/import.js b/import.js
@@ -16,23 +16,23 @@ const importFile = (octokit, file, values) => {
},
(err, csvRows) => {
if (err) throw err;
- var cols = csvRows[0].map(col => col.toLowerCase());
+ const cols = csvRows[0].map(col => col.toLowerCase());
csvRows.shift();
// get indexes of the fields we need
- var titleIndex = cols.indexOf("title");
- var bodyIndex = cols.indexOf("body");
- var labelsIndex = cols.indexOf("labels");
- var milestoneIndex = cols.indexOf("milestone");
- var assigneeIndex = cols.indexOf("assignee");
- var stateIndex = cols.indexOf("state");
+ const titleIndex = cols.indexOf("title");
+ const bodyIndex = cols.indexOf("body");
+ const labelsIndex = cols.indexOf("labels");
+ const milestoneIndex = cols.indexOf("milestone");
+ const assigneeIndex = cols.indexOf("assignee");
+ const stateIndex = cols.indexOf("state");
if (titleIndex === -1) {
console.error("Title required by GitHub, but not found in CSV.");
process.exit(1);
}
const createPromises = csvRows.map((row) => {
- var sendObj = {
+ const sendObj = {
owner: values.userOrOrganization,
repo: values.repo,
title: row[titleIndex],
diff --git a/index.js b/index.js
@@ -38,13 +38,13 @@ program
.option("-v, --verbose", "Include additional logging information.")
.action(function (file, options) {
co(function* () {
- var retObject = {};
+ const retObject = {};
retObject.githubUrl =
options.github_enterprise || "https://api.github.com";
retObject.token = options.token || "";
if (retObject.token === "") {
retObject.token = yield prompt(
- "token (get from https://github.com/settings/tokens): "
+ "Token (get from https://github.com/settings/tokens): "
);
}
retObject.exportFileName = options.exportFileName || false;
@@ -60,12 +60,12 @@ program
retObject.userOrOrganization = options.organization || "";
if (retObject.userOrOrganization === "") {
- retObject.userOrOrganization = yield prompt("user or organization: ");
+ retObject.userOrOrganization = yield prompt("User or organization: ");
}
retObject.repo = options.repository || "";
if (retObject.repo === "") {
- retObject.repo = yield prompt("repository: ");
+ retObject.repo = yield prompt("Repository: ");
}
return retObject;
}).then(