Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions src/flow-spec/IBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,22 @@ export function createEvalContextFrom(context: IContext): object {
prompt = cursor.promptConfig
}

const today = new Date()
const tomorrow = new Date()
const yesterday = new Date()

tomorrow.setDate(today.getDate() + 1)
tomorrow.setHours(0, 0, 0, 0)
yesterday.setDate(today.getDate() - 1)
yesterday.setHours(0, 0, 0, 0)
// now is todays full date + time
const now = new Date()

// today is just today's day, at midnight
const today = new Date(now)
today.setHours(0, 0, 0, 0);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: ESLint
Rule: eslint.rules.prettier/prettier
Severity: ERROR
File: src/flow-spec/IBlock.ts L152

Delete `;` (prettier/prettier)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: ESLint
Rule: eslint.rules.semi
Severity: WARN
File: src/flow-spec/IBlock.ts L152

Extra semicolon. (semi)


// tomorrow and yesterday also midnight
const tomorrow = new Date(now)
const yesterday = new Date(now)

tomorrow.setDate(now.getDate() + 1)
tomorrow.setHours(0, 0, 0, 0);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: ESLint
Rule: eslint.rules.prettier/prettier
Severity: ERROR
File: src/flow-spec/IBlock.ts L159

Delete `;` (prettier/prettier)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: ESLint
Rule: eslint.rules.semi
Severity: WARN
File: src/flow-spec/IBlock.ts L159

Extra semicolon. (semi)


yesterday.setDate(now.getDate() - 1)
yesterday.setHours(0, 0, 0, 0);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: ESLint
Rule: eslint.rules.prettier/prettier
Severity: ERROR
File: src/flow-spec/IBlock.ts L162

Delete `;` (prettier/prettier)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reporter: ESLint
Rule: eslint.rules.semi
Severity: WARN
File: src/flow-spec/IBlock.ts L162

Extra semicolon. (semi)


return {
contact: createEvalContactFrom(contact),
Expand Down