fix eslint warnigs for core project (#7506)

This commit is contained in:
Denys Vuika
2022-02-17 14:35:33 +00:00
committed by GitHub
parent 5b7f255eec
commit bca5a783ab
246 changed files with 5127 additions and 5065 deletions

View File

@@ -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',

View File

@@ -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);
});

View File

@@ -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[] {