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:
@@ -41,11 +41,10 @@ export class FileSizePipe implements PipeTransform {
|
||||
return '0 ' + this.translation.instant('CORE.FILE_SIZE.BYTES');
|
||||
}
|
||||
|
||||
const k = 1024,
|
||||
dm = decimals || 2,
|
||||
sizes = ['BYTES', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
||||
i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
|
||||
const k = 1024;
|
||||
const dm = decimals || 2;
|
||||
const sizes = ['BYTES', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
const i18nSize = this.translation.instant(`CORE.FILE_SIZE.${sizes[i]}`);
|
||||
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + i18nSize;
|
||||
|
Reference in New Issue
Block a user