fix(lint): fixed linting errors

This commit is contained in:
svetlanaMuravlova
2021-09-01 16:12:39 +03:00
parent 3b30991e11
commit c4566873f4
14 changed files with 226 additions and 394 deletions

View File

@@ -2,7 +2,7 @@ import { Component } from '@angular/core';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const doc = require('html-loader!markdown-loader!../../doc.md');
const tabDesc:Array<any> = [
const tabDesc: Array<any> = [
{
heading: 'Simple',
// eslint-disable-next-line @typescript-eslint/no-var-requires
@@ -19,12 +19,12 @@ const tabDesc:Array<any> = [
templateUrl: './file-upload-section.html'
})
export class FileUploadSectionComponent {
public name = 'File Upload';
public currentHeading = 'Simple';
public doc = doc;
public tabs:any = tabDesc;
name = 'File Upload';
currentHeading = 'Simple';
doc = doc;
tabs: any = tabDesc;
public select(e:any):void {
select(e: any): void {
if (e.heading) {
this.currentHeading = e.heading;
}

View File

@@ -10,18 +10,18 @@ const URL = 'https://evening-anchorage-3159.herokuapp.com/api/';
})
export class SimpleDemoComponent {
uploader:FileUploader;
hasBaseDropZoneOver:boolean;
hasAnotherDropZoneOver:boolean;
response:string;
uploader: FileUploader;
hasBaseDropZoneOver: boolean;
hasAnotherDropZoneOver: boolean;
response: string;
constructor (){
constructor() {
this.uploader = new FileUploader({
url: URL,
disableMultipart: true, // 'DisableMultipart' must be 'true' for formatDataFunction to be called.
formatDataFunctionIsAsync: true,
formatDataFunction: async (item) => {
return new Promise( (resolve, reject) => {
formatDataFunction: async item => {
return new Promise((resolve, reject) => {
resolve({
name: item._file.name,
length: item._file.size,
@@ -37,14 +37,14 @@ export class SimpleDemoComponent {
this.response = '';
this.uploader.response.subscribe( res => this.response = res );
this.uploader.response.subscribe(res => this.response = res );
}
public fileOverBase(e:any):void {
fileOverBase(e: any): void {
this.hasBaseDropZoneOver = e;
}
public fileOverAnother(e:any):void {
fileOverAnother(e: any): void {
this.hasAnotherDropZoneOver = e;
}
}