Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

Commit

Permalink
TsLint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiuconstantin committed Nov 30, 2018
1 parent e62ada6 commit 47c9398
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
6 changes: 6 additions & 0 deletions projects/cron-editor/src/lib/cron-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export class CronEditorComponent implements OnInit, OnChanges {
case 'daily':
switch (this.state.daily.subTab) {
case 'everyDays':
// tslint:disable-next-line:max-line-length
this.cron = `${this.state.daily.everyDays.minutes} ${this.hourToCron(this.state.daily.everyDays.hours, this.state.daily.everyDays.hourType)} 1/${this.state.daily.everyDays.days} * ?`;

if (!this.options.removeSeconds) {
Expand All @@ -117,6 +118,7 @@ export class CronEditorComponent implements OnInit, OnChanges {
}
break;
case 'everyWeekDay':
// tslint:disable-next-line:max-line-length
this.cron = `${this.state.daily.everyWeekDay.minutes} ${this.hourToCron(this.state.daily.everyWeekDay.hours, this.state.daily.everyWeekDay.hourType)} ? * MON-FRI`;

if (!this.options.removeSeconds) {
Expand Down Expand Up @@ -148,6 +150,7 @@ export class CronEditorComponent implements OnInit, OnChanges {
case 'monthly':
switch (this.state.monthly.subTab) {
case 'specificDay':
// tslint:disable-next-line:max-line-length
this.cron = `${this.state.monthly.specificDay.minutes} ${this.hourToCron(this.state.monthly.specificDay.hours, this.state.monthly.specificDay.hourType)} ${this.state.monthly.specificDay.day} 1/${this.state.monthly.specificDay.months} ?`;

if (!this.options.removeSeconds) {
Expand All @@ -159,6 +162,7 @@ export class CronEditorComponent implements OnInit, OnChanges {
}
break;
case 'specificWeekDay':
// tslint:disable-next-line:max-line-length
this.cron = `${this.state.monthly.specificWeekDay.minutes} ${this.hourToCron(this.state.monthly.specificWeekDay.hours, this.state.monthly.specificWeekDay.hourType)} ? 1/${this.state.monthly.specificWeekDay.months} ${this.state.monthly.specificWeekDay.day}${this.state.monthly.specificWeekDay.monthWeek}`;

if (!this.options.removeSeconds) {
Expand All @@ -176,6 +180,7 @@ export class CronEditorComponent implements OnInit, OnChanges {
case 'yearly':
switch (this.state.yearly.subTab) {
case 'specificMonthDay':
// tslint:disable-next-line:max-line-length
this.cron = `${this.state.yearly.specificMonthDay.minutes} ${this.hourToCron(this.state.yearly.specificMonthDay.hours, this.state.yearly.specificMonthDay.hourType)} ${this.state.yearly.specificMonthDay.day} ${this.state.yearly.specificMonthDay.month} ?`;

if (!this.options.removeSeconds) {
Expand All @@ -187,6 +192,7 @@ export class CronEditorComponent implements OnInit, OnChanges {
}
break;
case 'specificMonthWeek':
// tslint:disable-next-line:max-line-length
this.cron = `${this.state.yearly.specificMonthWeek.minutes} ${this.hourToCron(this.state.yearly.specificMonthWeek.hours, this.state.yearly.specificMonthWeek.hourType)} ? ${this.state.yearly.specificMonthWeek.month} ${this.state.yearly.specificMonthWeek.day}${this.state.yearly.specificMonthWeek.monthWeek}`;

if (!this.options.removeSeconds) {
Expand Down
28 changes: 14 additions & 14 deletions projects/cron-editor/src/lib/enums.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
export const Days = {
'SUN': "Sunday",
'MON': "Monday",
'TUE': "Tuesday",
'WED': "Wednesday",
'THU': "Thursday",
'FRI': "Friday",
'SAT': "Saturday"
'SUN': 'Sunday',
'MON': 'Monday',
'TUE': 'Tuesday',
'WED': 'Wednesday',
'THU': 'Thursday',
'FRI': 'Friday',
'SAT': 'Saturday'
};

export const MonthWeeks = {
'#1': "First",
'#2': "Second",
'#3': "Third",
'#4': "Fourth",
'#5': "Fifth",
'L': "Last"
'#1': 'First',
'#2': 'Second',
'#3': 'Third',
'#4': 'Fourth',
'#5': 'Fifth',
'L': 'Last'
};

export enum Months {
Expand All @@ -30,4 +30,4 @@ export enum Months {
October,
November,
December
};
}

0 comments on commit 47c9398

Please sign in to comment.