mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-7100] ESLint support for ADF Core and DemoShell projects (#7481)
* remove tsconfig.base as per eslint schematics * add schematics * upgrade demoshell to eslint * fix eslint issues for demoshell * integrate eslint for ADF core and fix some issues * turn into warn * fix code * workaround for Chrome clipboard issue * exclude e2e tests * exclude e2e
This commit is contained in:
@@ -1090,7 +1090,7 @@ describe('DataTable', () => {
|
||||
const column = <DataColumn> {};
|
||||
|
||||
const row: any = {
|
||||
getValue: function () {
|
||||
getValue: function() {
|
||||
return 'material-icons://android';
|
||||
}
|
||||
};
|
||||
@@ -1102,7 +1102,7 @@ describe('DataTable', () => {
|
||||
const column = <DataColumn> {};
|
||||
|
||||
const row: any = {
|
||||
getValue: function () {
|
||||
getValue: function() {
|
||||
return 'http://www.google.com';
|
||||
}
|
||||
};
|
||||
@@ -1114,7 +1114,7 @@ describe('DataTable', () => {
|
||||
const column = <DataColumn> {};
|
||||
|
||||
const row: any = {
|
||||
getValue: function () {
|
||||
getValue: function() {
|
||||
return 'material-icons://android';
|
||||
}
|
||||
};
|
||||
@@ -1126,7 +1126,7 @@ describe('DataTable', () => {
|
||||
const column = <DataColumn> {};
|
||||
|
||||
const row: any = {
|
||||
getValue: function () {
|
||||
getValue: function() {
|
||||
return 'http://www.google.com';
|
||||
}
|
||||
};
|
||||
@@ -1229,7 +1229,7 @@ describe('DataTable', () => {
|
||||
|
||||
const column = <DataColumn> {};
|
||||
const row: any = {
|
||||
getValue: function () {
|
||||
getValue: function() {
|
||||
return 'id';
|
||||
}
|
||||
};
|
||||
|
@@ -15,10 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable @angular-eslint/no-conflicting-lifecycle */
|
||||
|
||||
import {
|
||||
ViewChildren, QueryList, HostListener,
|
||||
AfterContentInit, Component, ContentChild, DoCheck, ElementRef, EventEmitter, Input,
|
||||
IterableDiffers, OnChanges, Output, SimpleChange, SimpleChanges, TemplateRef, ViewEncapsulation, OnDestroy
|
||||
IterableDiffers, OnChanges, Output, SimpleChange, SimpleChanges, TemplateRef, ViewEncapsulation, OnDestroy, AfterViewInit
|
||||
} from '@angular/core';
|
||||
import { FocusKeyManager } from '@angular/cdk/a11y';
|
||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
||||
@@ -57,7 +59,7 @@ export enum ShowHeaderMode {
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'adf-datatable' }
|
||||
})
|
||||
export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck, OnDestroy {
|
||||
export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck, OnDestroy, AfterViewInit {
|
||||
|
||||
@ViewChildren(DataTableRowComponent)
|
||||
rowsList: QueryList<DataTableRowComponent>;
|
||||
@@ -122,7 +124,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
|
||||
* docs for more details and usage examples.
|
||||
*/
|
||||
@Input()
|
||||
rowStyle: { [key: string]: any; };
|
||||
rowStyle: { [key: string]: any };
|
||||
|
||||
/** The CSS class to apply to every row. */
|
||||
@Input()
|
||||
@@ -203,7 +205,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
|
||||
private click$: Observable<DataRowEvent>;
|
||||
|
||||
private differ: any;
|
||||
private rowMenuCache: object = {};
|
||||
private rowMenuCache: any = {};
|
||||
|
||||
private subscriptions: Subscription[] = [];
|
||||
private singleClickStreamSub: Subscription;
|
||||
@@ -856,7 +858,7 @@ export interface DataTableDropEvent {
|
||||
target: 'cell' | 'header';
|
||||
event: Event;
|
||||
column: DataColumn;
|
||||
row?: DataRow
|
||||
row?: DataRow;
|
||||
};
|
||||
|
||||
preventDefault(): void;
|
||||
|
@@ -57,7 +57,7 @@ export class JsonCellComponent extends DataTableCellComponent implements OnInit
|
||||
}
|
||||
|
||||
view() {
|
||||
const rawValue: string | object = this.data.getValue(this.row, this.column, this.resolverFn);
|
||||
const rawValue: string | any = this.data.getValue(this.row, this.column, this.resolverFn);
|
||||
const value = typeof rawValue === 'object'
|
||||
? JSON.stringify(rawValue || {}, null, 2)
|
||||
: rawValue;
|
||||
|
Reference in New Issue
Block a user