mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix eslint warnigs for core project (#7506)
This commit is contained in:
@@ -23,7 +23,7 @@ describe('FileSizePipe', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
const translation: any = {
|
||||
instant(key) {
|
||||
instant: (key: string) => {
|
||||
const enUs = {
|
||||
'CORE.FILE_SIZE.BYTES': 'Bytes',
|
||||
'CORE.FILE_SIZE.KB': 'KB',
|
||||
|
@@ -35,7 +35,7 @@ describe('NodeNameTooltipPipe', () => {
|
||||
});
|
||||
|
||||
it('should not transform when missing node entry', () => {
|
||||
expect(pipe.transform(<any> {})).toBe(null);
|
||||
expect(pipe.transform({} as any)).toBe(null);
|
||||
});
|
||||
|
||||
it('should use title and description when all fields present', () => {
|
||||
@@ -57,8 +57,8 @@ describe('NodeNameTooltipPipe', () => {
|
||||
entry: {
|
||||
name: nodeName
|
||||
}
|
||||
};
|
||||
const tooltip = pipe.transform(<NodeEntry> node);
|
||||
} as NodeEntry;
|
||||
const tooltip = pipe.transform(node);
|
||||
expect(tooltip).toBe(nodeName);
|
||||
});
|
||||
|
||||
|
@@ -31,9 +31,7 @@ export class NodeNameTooltipPipe implements PipeTransform {
|
||||
}
|
||||
|
||||
private containsLine(lines: string[], line: string): boolean {
|
||||
return lines.some((item: string) => {
|
||||
return item.toLowerCase() === line.toLowerCase();
|
||||
});
|
||||
return lines.some((item: string) => item.toLowerCase() === line.toLowerCase());
|
||||
}
|
||||
|
||||
private removeDuplicateLines(lines: string[]): string[] {
|
||||
|
Reference in New Issue
Block a user