Skip to content

Commit

Permalink
eslint: remove linting warnings/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
prestist committed Oct 27, 2023
1 parent 470826f commit 34ba31a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
14 changes: 7 additions & 7 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"format:write": "prettier --write **/*.ts",
"format:check": "prettier --check **/*.ts",
"lint": "npx eslint . -c ./.github/linters/.eslintrc.yml",
"lint:fix": "npx eslint . -c ./.github/linters/.eslintrc.yml --fix",
"package": "ncc build src/index.ts --license licenses.txt",
"package:watch": "npm run package -- --watch",
"test": "(jest && make-coverage-badge --output-path ./badges/coverage.svg) || make-coverage-badge --output-path ./badges/coverage.svg",
Expand Down
6 changes: 3 additions & 3 deletions src/actionItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ export async function GetActionItems(): Promise<string> {
const meetingNotesURL = core.getInput('rootURLMeetingLogs')
let lastMeetingNotesUrl = `fedora_coreos_meeting.`
const listOfMeetings = await fetchData(meetingNotesURL)
let matches = listOfMeetings.match(meetingListRegEx)
const matches = listOfMeetings.match(meetingListRegEx)

if (matches != null) {
const lastMeeting = matches[matches.length - 1]
// This should be the latest meeting`s date in with the format of YYYY-MM-DD-HH.MM.txt
lastMeetingNotesUrl = meetingNotesURL + lastMeetingNotesUrl + lastMeeting
console.debug('last meeting notes url' + lastMeetingNotesUrl)
console.debug(`last meeting notes url${lastMeetingNotesUrl}`)
const lastMeetingNotes = await fetchData(lastMeetingNotesUrl)
const actionItemMatches = actionItemsRegEx.exec(lastMeetingNotes)

if (actionItemMatches) {
console.debug('action item matches' + actionItemMatches[0])
console.debug(`action item matches${actionItemMatches[0]}`)
// if the match is just new lines, then there were no action items
if (actionItemMatches[0].match(/^\s*$/)) {
return `#topic there are no action items from the last meeting.`
Expand Down
2 changes: 1 addition & 1 deletion src/createIssue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function createThisReposIssue(body: string): Promise<void> {
})
// calculate todays date in YYYY-MM-DD format
const today = new Date().toISOString().split('T')[0]
var title = core.getInput('issueTitle') + ' ' + today
const title = `${core.getInput('issueTitle')} ${today}`
const githubRepository = process.env.GITHUB_REPOSITORY
if (!githubRepository) {
throw new Error(`GITHUB_REPOSITORY environment variable is not set`)
Expand Down
6 changes: 3 additions & 3 deletions src/meetingTopics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export async function GetMeetingTopics(): Promise<string> {
}

let issuesToBeDiscussed = ``
for (let i = 0; i < issues.data.length; i++) {
issuesToBeDiscussed += ` - [ ] \`#topic ${issues.data[i].title}\` \n`
issuesToBeDiscussed += ` - \`#link ${issues.data[i].html_url}\` \n`
for (var i of issues.data) {

Check failure on line 21 in src/meetingTopics.ts

View workflow job for this annotation

GitHub Actions / Lint Code Base

Unexpected var, use let or const instead
issuesToBeDiscussed += ` - [ ] \`#topic ${i.title}\` \n`
issuesToBeDiscussed += ` - \`#link ${i.html_url}\` \n`
}
return issuesToBeDiscussed
} catch (error) {
Expand Down

0 comments on commit 34ba31a

Please sign in to comment.