Fix errors found by linter
This commit is contained in:
@@ -19,19 +19,19 @@ export class HTMLTable {
|
||||
let output = '<table>\n'
|
||||
|
||||
output += ' <thead>\n <tr>'
|
||||
for (let column of this.columns) {
|
||||
for (const column of this.columns) {
|
||||
output += `<th align="left">${column.name}</th>`
|
||||
}
|
||||
output += '</tr>\n </thead>\n'
|
||||
|
||||
output += ' <tbody>\n'
|
||||
for (let item of this.data) {
|
||||
for (const item of this.data) {
|
||||
output += ' <tr>'
|
||||
let i = 0
|
||||
for (let prop in item) {
|
||||
for (const prop in item) {
|
||||
const column = this.columns[i]
|
||||
let nowrap = column.nowrap ? ` nowrap` : ''
|
||||
let align = column.align ? ` align="${column.align}"` : ''
|
||||
const nowrap = column.nowrap ? ' nowrap' : ''
|
||||
const align = column.align ? ` align="${column.align}"` : ''
|
||||
output += `<td${align}${nowrap}>${item[prop]}</td>`
|
||||
i++
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ const octokit = new CustomOctokit()
|
||||
export class IssueLoader {
|
||||
async load({ labels }: { labels: string[] | string }) {
|
||||
labels = Array.isArray(labels) ? labels.join(',') : labels
|
||||
let issues: any[] = []
|
||||
let issues: object[] = []
|
||||
if (TESTING) {
|
||||
switch (labels) {
|
||||
case 'streams:add':
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Dictionary } from '@freearhey/core'
|
||||
import { Issue } from '../models'
|
||||
import _ from 'lodash'
|
||||
|
||||
const FIELDS = new Dictionary({
|
||||
'Channel ID': 'channel_id',
|
||||
@@ -21,7 +20,7 @@ const FIELDS = new Dictionary({
|
||||
})
|
||||
|
||||
export class IssueParser {
|
||||
parse(issue: any): Issue {
|
||||
parse(issue: { number: number; body: string; labels: { name: string }[] }): Issue {
|
||||
const fields = issue.body.split('###')
|
||||
|
||||
const data = new Dictionary()
|
||||
|
||||
@@ -4,7 +4,7 @@ export type LogItem = {
|
||||
}
|
||||
|
||||
export class LogParser {
|
||||
parse(content: string): any[] {
|
||||
parse(content: string): LogItem[] {
|
||||
if (!content) return []
|
||||
const lines = content.split('\n')
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export class PlaylistParser {
|
||||
async parse(files: string[]): Promise<Collection> {
|
||||
let streams = new Collection()
|
||||
|
||||
for (let filepath of files) {
|
||||
for (const filepath of files) {
|
||||
const relativeFilepath = filepath.replace(path.normalize(STREAMS_DIR), '')
|
||||
const _streams: Collection = await this.parseFile(relativeFilepath)
|
||||
streams = streams.concat(_streams)
|
||||
|
||||
Reference in New Issue
Block a user