mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2024-10-30 01:08:47 +00:00
(eslint) Fixed linting issues
This commit is contained in:
parent
3c0e326113
commit
6bcd04b799
|
@ -61,9 +61,9 @@ export class FuseDateRangeComponent implements ControlValueAccessor, OnInit, OnD
|
|||
private _viewContainerRef: ViewContainerRef
|
||||
)
|
||||
{
|
||||
this._onChange = () => {
|
||||
this._onChange = (): void => {
|
||||
};
|
||||
this._onTouched = () => {
|
||||
this._onTouched = (): void => {
|
||||
};
|
||||
this.dateFormat = 'DD/MM/YYYY';
|
||||
this.timeFormat = '12';
|
||||
|
@ -361,7 +361,7 @@ export class FuseDateRangeComponent implements ControlValueAccessor, OnInit, OnD
|
|||
this._unsubscribeAll.complete();
|
||||
|
||||
// @ TODO: Workaround until "angular/issues/20007" resolved
|
||||
this.writeValue = () => {
|
||||
this.writeValue = (): void => {
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ export class FuseScrollbarDirective implements OnChanges, OnInit, OnDestroy
|
|||
|
||||
const cosParameter = (oldValue - value) / 2;
|
||||
|
||||
const step = (newTimestamp: number) => {
|
||||
const step = (newTimestamp: number): void => {
|
||||
scrollCount += Math.PI / (speed / (newTimestamp - oldTimestamp));
|
||||
newValue = Math.round(value + cosParameter + cosParameter * Math.cos(scrollCount));
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import { InitialDataResolver } from 'app/app.resolvers';
|
|||
|
||||
// @formatter:off
|
||||
/* eslint-disable max-len */
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
export const appRoutes: Route[] = [
|
||||
|
||||
// Redirect empty path to '/dashboards/project'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { Overlay } from '@angular/cdk/overlay';
|
||||
import { BlockScrollStrategy, Overlay } from '@angular/cdk/overlay';
|
||||
import { MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
|
@ -28,7 +28,7 @@ import { SearchComponent } from 'app/layout/common/search/search.component';
|
|||
providers : [
|
||||
{
|
||||
provide : MAT_AUTOCOMPLETE_SCROLL_STRATEGY,
|
||||
useFactory: (overlay: Overlay) => () => overlay.scrollStrategies.block(),
|
||||
useFactory: (overlay: Overlay) => (): BlockScrollStrategy => overlay.scrollStrategies.block(),
|
||||
deps : [Overlay]
|
||||
}
|
||||
]
|
||||
|
|
|
@ -295,12 +295,12 @@ export class ContactsMockApi
|
|||
const reader = new FileReader();
|
||||
|
||||
// Resolve the promise on success
|
||||
reader.onload = () => {
|
||||
reader.onload = (): void => {
|
||||
resolve(reader.result);
|
||||
};
|
||||
|
||||
// Reject the promise on error
|
||||
reader.onerror = (e) => {
|
||||
reader.onerror = (e): void => {
|
||||
reject(e);
|
||||
};
|
||||
|
||||
|
|
|
@ -243,8 +243,8 @@ export class CalendarComponent implements OnInit, AfterViewInit, OnDestroy
|
|||
day : 'numeric',
|
||||
omitCommas: true
|
||||
},
|
||||
columnHeaderHtml : date => `<span class="fc-weekday">${moment(date).format('ddd')}</span>
|
||||
<span class="fc-date">${moment(date).format('D')}</span>`,
|
||||
columnHeaderHtml : (date): string => `<span class="fc-weekday">${moment(date).format('ddd')}</span>
|
||||
<span class="fc-date">${moment(date).format('D')}</span>`,
|
||||
slotDuration : '01:00:00',
|
||||
slotLabelFormat : this.eventTimeFormat
|
||||
},
|
||||
|
|
|
@ -330,12 +330,12 @@ export class NotesDetailsComponent implements OnInit, OnDestroy
|
|||
const reader = new FileReader();
|
||||
|
||||
// Resolve the promise on success
|
||||
reader.onload = () => {
|
||||
reader.onload = (): void => {
|
||||
resolve(reader.result);
|
||||
};
|
||||
|
||||
// Reject the promise on error
|
||||
reader.onerror = (e) => {
|
||||
reader.onerror = (e): void => {
|
||||
reject(e);
|
||||
};
|
||||
|
||||
|
|
|
@ -70,10 +70,10 @@ export class AnalyticsComponent implements OnInit, OnDestroy
|
|||
window['Apex'] = {
|
||||
chart: {
|
||||
events: {
|
||||
mounted: (chart: any, options?: any) => {
|
||||
mounted: (chart: any, options?: any): void => {
|
||||
this._fixSvgFill(chart.el);
|
||||
},
|
||||
updated: (chart: any, options?: any) => {
|
||||
updated: (chart: any, options?: any): void => {
|
||||
this._fixSvgFill(chart.el);
|
||||
}
|
||||
}
|
||||
|
@ -234,8 +234,8 @@ export class AnalyticsComponent implements OnInit, OnDestroy
|
|||
axisBorder: {
|
||||
show: false
|
||||
},
|
||||
min : min => min - 750,
|
||||
max : max => max + 250,
|
||||
min : (min): number => min - 750,
|
||||
max : (max): number => max + 250,
|
||||
tickAmount: 5,
|
||||
show : false
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ export class AnalyticsComponent implements OnInit, OnDestroy
|
|||
},
|
||||
yaxis : {
|
||||
labels: {
|
||||
formatter: val => val.toString()
|
||||
formatter: (val): string => val.toString()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -312,7 +312,7 @@ export class AnalyticsComponent implements OnInit, OnDestroy
|
|||
},
|
||||
yaxis : {
|
||||
labels: {
|
||||
formatter: val => val.toString()
|
||||
formatter: (val): string => val.toString()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -350,7 +350,7 @@ export class AnalyticsComponent implements OnInit, OnDestroy
|
|||
},
|
||||
yaxis : {
|
||||
labels: {
|
||||
formatter: val => val.toString()
|
||||
formatter: (val): string => val.toString()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -426,8 +426,8 @@ export class AnalyticsComponent implements OnInit, OnDestroy
|
|||
colors: 'var(--fuse-text-secondary)'
|
||||
}
|
||||
},
|
||||
max : max => max + 250,
|
||||
min : min => min - 250,
|
||||
max : (max): number => max + 250,
|
||||
min : (min): number => min - 250,
|
||||
show : false,
|
||||
tickAmount: 5
|
||||
}
|
||||
|
@ -481,11 +481,11 @@ export class AnalyticsComponent implements OnInit, OnDestroy
|
|||
custom : ({
|
||||
seriesIndex,
|
||||
w
|
||||
}) => `<div class="flex items-center h-8 min-h-8 max-h-8 px-3">
|
||||
<div class="w-3 h-3 rounded-full" style="background-color: ${w.config.colors[seriesIndex]};"></div>
|
||||
<div class="ml-2 text-md leading-none">${w.config.labels[seriesIndex]}:</div>
|
||||
<div class="ml-2 text-md font-bold leading-none">${w.config.series[seriesIndex]}%</div>
|
||||
</div>`
|
||||
}): string => `<div class="flex items-center h-8 min-h-8 max-h-8 px-3">
|
||||
<div class="w-3 h-3 rounded-full" style="background-color: ${w.config.colors[seriesIndex]};"></div>
|
||||
<div class="ml-2 text-md leading-none">${w.config.labels[seriesIndex]}:</div>
|
||||
<div class="ml-2 text-md font-bold leading-none">${w.config.series[seriesIndex]}%</div>
|
||||
</div>`
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -537,11 +537,11 @@ export class AnalyticsComponent implements OnInit, OnDestroy
|
|||
custom : ({
|
||||
seriesIndex,
|
||||
w
|
||||
}) => `<div class="flex items-center h-8 min-h-8 max-h-8 px-3">
|
||||
<div class="w-3 h-3 rounded-full" style="background-color: ${w.config.colors[seriesIndex]};"></div>
|
||||
<div class="ml-2 text-md leading-none">${w.config.labels[seriesIndex]}:</div>
|
||||
<div class="ml-2 text-md font-bold leading-none">${w.config.series[seriesIndex]}%</div>
|
||||
</div>`
|
||||
}): string => `<div class="flex items-center h-8 min-h-8 max-h-8 px-3">
|
||||
<div class="w-3 h-3 rounded-full" style="background-color: ${w.config.colors[seriesIndex]};"></div>
|
||||
<div class="ml-2 text-md leading-none">${w.config.labels[seriesIndex]}:</div>
|
||||
<div class="ml-2 text-md font-bold leading-none">${w.config.series[seriesIndex]}%</div>
|
||||
</div>`
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -593,11 +593,11 @@ export class AnalyticsComponent implements OnInit, OnDestroy
|
|||
custom : ({
|
||||
seriesIndex,
|
||||
w
|
||||
}) => `<div class="flex items-center h-8 min-h-8 max-h-8 px-3">
|
||||
<div class="w-3 h-3 rounded-full" style="background-color: ${w.config.colors[seriesIndex]};"></div>
|
||||
<div class="ml-2 text-md leading-none">${w.config.labels[seriesIndex]}:</div>
|
||||
<div class="ml-2 text-md font-bold leading-none">${w.config.series[seriesIndex]}%</div>
|
||||
</div>`
|
||||
}): string => `<div class="flex items-center h-8 min-h-8 max-h-8 px-3">
|
||||
<div class="w-3 h-3 rounded-full" style="background-color: ${w.config.colors[seriesIndex]};"></div>
|
||||
<div class="ml-2 text-md leading-none">${w.config.labels[seriesIndex]}:</div>
|
||||
<div class="ml-2 text-md font-bold leading-none">${w.config.series[seriesIndex]}%</div>
|
||||
</div>`
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -649,11 +649,11 @@ export class AnalyticsComponent implements OnInit, OnDestroy
|
|||
custom : ({
|
||||
seriesIndex,
|
||||
w
|
||||
}) => `<div class="flex items-center h-8 min-h-8 max-h-8 px-3">
|
||||
<div class="w-3 h-3 rounded-full" style="background-color: ${w.config.colors[seriesIndex]};"></div>
|
||||
<div class="ml-2 text-md leading-none">${w.config.labels[seriesIndex]}:</div>
|
||||
<div class="ml-2 text-md font-bold leading-none">${w.config.series[seriesIndex]}%</div>
|
||||
</div>`
|
||||
}): string => `<div class="flex items-center h-8 min-h-8 max-h-8 px-3">
|
||||
<div class="w-3 h-3 rounded-full" style="background-color: ${w.config.colors[seriesIndex]};"></div>
|
||||
<div class="ml-2 text-md leading-none">${w.config.labels[seriesIndex]}:</div>
|
||||
<div class="ml-2 text-md font-bold leading-none">${w.config.series[seriesIndex]}%</div>
|
||||
</div>`
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -58,10 +58,10 @@ export class ProjectComponent implements OnInit, OnDestroy
|
|||
window['Apex'] = {
|
||||
chart: {
|
||||
events: {
|
||||
mounted: (chart: any, options?: any) => {
|
||||
mounted: (chart: any, options?: any): void => {
|
||||
this._fixSvgFill(chart.el);
|
||||
},
|
||||
updated: (chart: any, options?: any) => {
|
||||
updated: (chart: any, options?: any): void => {
|
||||
this._fixSvgFill(chart.el);
|
||||
}
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ export class ProjectComponent implements OnInit, OnDestroy
|
|||
categories: this.data.budgetDistribution.categories
|
||||
},
|
||||
yaxis : {
|
||||
max : (max: number) => parseInt((max + 10).toFixed(0), 10),
|
||||
max : (max: number): number => parseInt((max + 10).toFixed(0), 10),
|
||||
tickAmount: 7
|
||||
}
|
||||
};
|
||||
|
@ -360,7 +360,7 @@ export class ProjectComponent implements OnInit, OnDestroy
|
|||
},
|
||||
yaxis : {
|
||||
labels: {
|
||||
formatter: val => `$${val}`
|
||||
formatter: (val): string => `$${val}`
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -393,7 +393,7 @@ export class ProjectComponent implements OnInit, OnDestroy
|
|||
},
|
||||
yaxis : {
|
||||
labels: {
|
||||
formatter: val => `$${val}`
|
||||
formatter: (val): string => `$${val}`
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -426,7 +426,7 @@ export class ProjectComponent implements OnInit, OnDestroy
|
|||
},
|
||||
yaxis : {
|
||||
labels: {
|
||||
formatter: val => `$${val}`
|
||||
formatter: (val): string => `$${val}`
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user