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

@@ -24,12 +24,12 @@ export class DownloadService {
private readonly saveData: any;
constructor() {
this.saveData = (function() {
this.saveData = (() => {
const a = document.createElement('a');
document.body.appendChild(a);
a.style.display = 'none';
return function(fileData, format, fileName) {
return (fileData, format, fileName) => {
let blob = null;
if (format === 'blob' || format === 'data') {
@@ -42,10 +42,8 @@ export class DownloadService {
}
if (blob) {
if (
typeof window.navigator !== 'undefined' &&
window.navigator['msSaveOrOpenBlob']
) {
if (typeof window.navigator !== 'undefined' &&
window.navigator['msSaveOrOpenBlob']) {
window.navigator['msSaveOrOpenBlob'](blob, fileName);
} else {
const url = window.URL.createObjectURL(blob);
@@ -62,6 +60,7 @@ export class DownloadService {
/**
* Invokes content download for a Blob with a file name.
*
* @param blob Content to download.
* @param fileName Name of the resulting file.
*/
@@ -71,6 +70,7 @@ export class DownloadService {
/**
* Invokes content download for a data array with a file name.
*
* @param data Data to download.
* @param fileName Name of the resulting file.
*/
@@ -80,6 +80,7 @@ export class DownloadService {
/**
* Invokes content download for a JSON object with a file name.
*
* @param json JSON object to download.
* @param fileName Name of the resulting file.
*/
@@ -89,6 +90,7 @@ export class DownloadService {
/**
* Invokes the download of the file by its URL address.
*
* @param url Url address pointing to the file.
* @param fileName Name of the file download.
*/