mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
Enable ESLint no-unused-vars rule (#4367)
# Description of Changes Enable ESLint [no-unused-vars rule](https://typescript-eslint.io/rules/no-unused-vars/)
This commit is contained in:
@@ -31,7 +31,7 @@ export class PDFExportService {
|
||||
const originalPDFBytes = await pdfDocument.file.arrayBuffer();
|
||||
const sourceDoc = await PDFLibDocument.load(originalPDFBytes);
|
||||
const blob = await this.createSingleDocument(sourceDoc, pagesToExport);
|
||||
const exportFilename = this.generateFilename(filename || pdfDocument.name, selectedOnly, false);
|
||||
const exportFilename = this.generateFilename(filename || pdfDocument.name);
|
||||
|
||||
return { blob, filename: exportFilename };
|
||||
} catch (error) {
|
||||
@@ -62,7 +62,7 @@ export class PDFExportService {
|
||||
}
|
||||
|
||||
const blob = await this.createMultiSourceDocument(sourceFiles, pagesToExport);
|
||||
const exportFilename = this.generateFilename(filename || pdfDocument.name, selectedOnly, false);
|
||||
const exportFilename = this.generateFilename(filename || pdfDocument.name);
|
||||
|
||||
return { blob, filename: exportFilename };
|
||||
} catch (error) {
|
||||
@@ -183,7 +183,7 @@ export class PDFExportService {
|
||||
/**
|
||||
* Generate appropriate filename for export
|
||||
*/
|
||||
private generateFilename(originalName: string, selectedOnly: boolean, appendSuffix: boolean): string {
|
||||
private generateFilename(originalName: string): string {
|
||||
const baseName = originalName.replace(/\.pdf$/i, '');
|
||||
return `${baseName}.pdf`;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ export class PDFExportService {
|
||||
/**
|
||||
* Download multiple files as a ZIP
|
||||
*/
|
||||
async downloadAsZip(blobs: Blob[], filenames: string[], zipFilename: string): Promise<void> {
|
||||
async downloadAsZip(blobs: Blob[], filenames: string[]): Promise<void> {
|
||||
blobs.forEach((blob, index) => {
|
||||
setTimeout(() => {
|
||||
this.downloadFile(blob, filenames[index]);
|
||||
|
||||
Reference in New Issue
Block a user