Skip to content

Commit

Permalink
fix: lintfix
Browse files Browse the repository at this point in the history
  • Loading branch information
beauraines committed Mar 13, 2023
1 parent 173f05f commit e52684c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions cmds/today.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Client from '../client.js'
import dayjs from 'dayjs'
import {getWorkspace,getProjects, formatDuration,formatDurationAsTime} from '../utils.js'
import { getWorkspace, getProjects, formatDuration, formatDurationAsTime } from '../utils.js'
import dur from 'dayjs/plugin/duration.js'
import relativeTime from 'dayjs/plugin/relativeTime.js'
import Table from "cli-table3";
import Table from 'cli-table3'
dayjs.extend(relativeTime)
dayjs.extend(dur)

Expand All @@ -15,7 +15,7 @@ export const handler = async function (argv) {
const client = Client()
const workspace = await getWorkspace()
const projects = await getProjects(workspace.id)
const params = {
const params = {
start_date: dayjs().startOf('day').toISOString(),
end_date: dayjs().toISOString()
}
Expand Down Expand Up @@ -78,7 +78,7 @@ function displayDailyReport (report, format) {
break
case 'table':
default:
let table = new Table({
const table = new Table({
head: ['Project', 'Duration']
})
for (const project of report) {
Expand Down
8 changes: 4 additions & 4 deletions cmds/weekly.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getWorkspace, formatDuration, getProjectById } from '../utils.js'
import dayjs from 'dayjs'
import dur from 'dayjs/plugin/duration.js'
import relativeTime from 'dayjs/plugin/relativeTime.js'
import Table from "cli-table3";
import Table from 'cli-table3'
dayjs.extend(relativeTime)
dayjs.extend(dur)

Expand Down Expand Up @@ -55,9 +55,9 @@ export const handler = async function (argv) {
for (const project of reportData) {
project.Total = formatDuration(project.Total * 1000)
}
let head = Object.keys(reportData[0])
let table = new Table({

const head = Object.keys(reportData[0])
const table = new Table({
head
})
for (const project of reportData) {
Expand Down

0 comments on commit e52684c

Please sign in to comment.