diff --git a/.eslintrc.json b/.eslintrc.json index cf2179dd..a794ae83 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -45,6 +45,7 @@ }, "rules": { "semi": "off", + "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/semi": [ "error" ], diff --git a/apps/demo/src/app/components/file-upload/simple-demo.ts b/apps/demo/src/app/components/file-upload/simple-demo.ts index 0a30c1a3..6f0b9ef0 100644 --- a/apps/demo/src/app/components/file-upload/simple-demo.ts +++ b/apps/demo/src/app/components/file-upload/simple-demo.ts @@ -21,7 +21,7 @@ export class SimpleDemoComponent { disableMultipart: true, // 'DisableMultipart' must be 'true' for formatDataFunction to be called. formatDataFunctionIsAsync: true, formatDataFunction: async item => { - return new Promise((resolve, reject) => { + return new Promise((resolve, ) => { resolve({ name: item._file.name, length: item._file.size, diff --git a/apps/demo/src/typings.d.ts b/apps/demo/src/typings.d.ts index f18e8b97..25cb602a 100644 --- a/apps/demo/src/typings.d.ts +++ b/apps/demo/src/typings.d.ts @@ -11,6 +11,7 @@ declare const PR:any; // declare const global:any; // eslint-disable-next-line @typescript-eslint/prefer-namespace-keyword declare module jasmine { + // eslint-disable-next-line @typescript-eslint/no-unused-vars interface Matchers { toHaveCssClass(expected: any): boolean; } diff --git a/libs/ng2-file-upload/file-upload/file-uploader.class.ts b/libs/ng2-file-upload/file-upload/file-uploader.class.ts index a4940bb4..9954cc7b 100644 --- a/libs/ng2-file-upload/file-upload/file-uploader.class.ts +++ b/libs/ng2-file-upload/file-upload/file-uploader.class.ts @@ -344,7 +344,7 @@ export class FileUploader { }; xhr.onload = () => { const headers = this._parseHeaders(xhr.getAllResponseHeaders()); - const response = this._transformResponse(xhr.response, headers); + const response = this._transformResponse(xhr.response); const gist = this._isSuccessCode(xhr.status) ? 'Success' : 'Error'; const method = `_on${gist}Item`; (this as any)[ method ](item, response, xhr.status, headers); @@ -352,13 +352,13 @@ export class FileUploader { }; xhr.onerror = () => { const headers = this._parseHeaders(xhr.getAllResponseHeaders()); - const response = this._transformResponse(xhr.response, headers); + const response = this._transformResponse(xhr.response); this._onErrorItem(item, response, xhr.status, headers); this._onCompleteItem(item, response, xhr.status, headers); }; xhr.onabort = () => { const headers = this._parseHeaders(xhr.getAllResponseHeaders()); - const response = this._transformResponse(xhr.response, headers); + const response = this._transformResponse(xhr.response); this._onCancelItem(item, response, xhr.status, headers); this._onCompleteItem(item, response, xhr.status, headers); }; @@ -446,7 +446,7 @@ export class FileUploader { return (status >= 200 && status < 300) || status === 304; } - protected _transformResponse(response: string, headers: ParsedResponseHeaders): string { + protected _transformResponse(response: string): string { return response; }