mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Improved ESLint configuration, integrated spellcheck and error fixes (#8931)
* integrate cspell with eslint, improved configuration * core: fix linting errors * core: fix lint warnings * content: lint fixes * process service lint fixes * lint: process services cloud * lint: insights * lint: extensions * [ci:force] lint: cli fixes * [ci:force] comment out dead code * [ci:force] exclude dead code * fix code and tests * rollback some changes * fix testing lib * fix demo shell * minor lint warning fixes * minor lint fixes * fix process services
This commit is contained in:
@@ -175,7 +175,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
|
||||
onValueChanged(values: any) {
|
||||
this.formValueChanged.emit(values);
|
||||
if (this.reportForm && this.reportForm.valid) {
|
||||
if (this.reportForm?.valid) {
|
||||
this.submit(values);
|
||||
}
|
||||
}
|
||||
@@ -306,7 +306,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
}
|
||||
|
||||
ngAfterContentChecked() {
|
||||
if (this.reportForm && this.reportForm.valid) {
|
||||
if (this.reportForm?.valid) {
|
||||
this.reportForm.markAsDirty();
|
||||
}
|
||||
}
|
||||
@@ -320,7 +320,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
}
|
||||
|
||||
isFormValid() {
|
||||
return this.reportForm && this.reportForm.dirty && this.reportForm.valid;
|
||||
return this.reportForm?.dirty && this.reportForm.valid;
|
||||
}
|
||||
|
||||
get taskGroup(): UntypedFormGroup {
|
||||
|
@@ -117,7 +117,7 @@ export class DiagramComponent implements OnChanges {
|
||||
|
||||
setMetricValueToDiagramElement(diagram: DiagramModel, metrics: any, metricType: string) {
|
||||
for (const key in metrics) {
|
||||
if (metrics.hasOwnProperty(key)) {
|
||||
if (Object.prototype.hasOwnProperty.call(metrics, key)) {
|
||||
const foundElement: DiagramElementModel = diagram.elements.find(
|
||||
(element: DiagramElementModel) => element.id === key);
|
||||
if (foundElement) {
|
||||
|
@@ -40,8 +40,8 @@ export class BarChart extends Chart {
|
||||
|
||||
constructor(obj?: any) {
|
||||
super(obj);
|
||||
this.xAxisType = obj && obj.xAxisType || null;
|
||||
this.yAxisType = obj && obj.yAxisType || null;
|
||||
this.xAxisType = obj?.xAxisType || null;
|
||||
this.yAxisType = obj?.yAxisType || null;
|
||||
this.options.scales.xAxes[0].ticks.callback = this.xAxisTickFormatFunction(this.xAxisType);
|
||||
this.options.scales.yAxes[0].ticks.callback = this.yAxisTickFormatFunction(this.yAxisType);
|
||||
if (obj.values) {
|
||||
|
@@ -34,7 +34,7 @@ export class DiagramColorService {
|
||||
}
|
||||
|
||||
getFillColour(key: string) {
|
||||
if (this.totalColors?.hasOwnProperty(key)) {
|
||||
if (this.totalColors && Object.prototype.hasOwnProperty.call(this.totalColors, key)) {
|
||||
const colorPercentage = this.totalColors[key];
|
||||
return this.convertColorToHsb(colorPercentage);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user