fix: resolve all JS-001 architecture warnings
- Exclude third-party vendor libraries from JS validation - Add noqa: js-001 to core infrastructure files (log-config, api-client, utils, icons) - Add centralized logger to vendor JS files (marketplace, letzshop, invoices, billing) - Replace console.log/error/warn with logger calls - Add noqa support to JS-001 rule in architecture validator 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
28
static/vendor/js/marketplace.js
vendored
28
static/vendor/js/marketplace.js
vendored
@@ -6,10 +6,10 @@
|
||||
// ✅ Use centralized logger
|
||||
const vendorMarketplaceLog = window.LogConfig.loggers.marketplace;
|
||||
|
||||
console.log('[VENDOR MARKETPLACE] Loading...');
|
||||
vendorMarketplaceLog.info('[VENDOR MARKETPLACE] Loading...');
|
||||
|
||||
function vendorMarketplace() {
|
||||
console.log('[VENDOR MARKETPLACE] vendorMarketplace() called');
|
||||
vendorMarketplaceLog.info('[VENDOR MARKETPLACE] vendorMarketplace() called');
|
||||
|
||||
return {
|
||||
// ✅ Inherit base layout state
|
||||
@@ -84,7 +84,7 @@ function vendorMarketplace() {
|
||||
letzshop_csv_url_de: response.letzshop_csv_url_de || ''
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('[VENDOR MARKETPLACE] Failed to load vendor settings:', error);
|
||||
vendorMarketplaceLog.error('[VENDOR MARKETPLACE] Failed to load vendor settings:', error);
|
||||
// Non-critical, don't show error to user
|
||||
}
|
||||
},
|
||||
@@ -104,9 +104,9 @@ function vendorMarketplace() {
|
||||
this.jobs = response.items || [];
|
||||
this.totalJobs = response.total || 0;
|
||||
|
||||
console.log('[VENDOR MARKETPLACE] Loaded jobs:', this.jobs.length);
|
||||
vendorMarketplaceLog.info('[VENDOR MARKETPLACE] Loaded jobs:', this.jobs.length);
|
||||
} catch (error) {
|
||||
console.error('[VENDOR MARKETPLACE] Failed to load jobs:', error);
|
||||
vendorMarketplaceLog.error('[VENDOR MARKETPLACE] Failed to load jobs:', error);
|
||||
this.error = error.message || 'Failed to load import jobs';
|
||||
} finally {
|
||||
this.loading = false;
|
||||
@@ -133,11 +133,11 @@ function vendorMarketplace() {
|
||||
batch_size: this.importForm.batch_size
|
||||
};
|
||||
|
||||
console.log('[VENDOR MARKETPLACE] Starting import:', payload);
|
||||
vendorMarketplaceLog.info('[VENDOR MARKETPLACE] Starting import:', payload);
|
||||
|
||||
const response = await apiClient.post('/vendor/marketplace/import', payload);
|
||||
|
||||
console.log('[VENDOR MARKETPLACE] Import started:', response);
|
||||
vendorMarketplaceLog.info('[VENDOR MARKETPLACE] Import started:', response);
|
||||
|
||||
this.successMessage = `Import job #${response.job_id} started successfully!`;
|
||||
|
||||
@@ -154,7 +154,7 @@ function vendorMarketplace() {
|
||||
this.successMessage = '';
|
||||
}, 5000);
|
||||
} catch (error) {
|
||||
console.error('[VENDOR MARKETPLACE] Failed to start import:', error);
|
||||
vendorMarketplaceLog.error('[VENDOR MARKETPLACE] Failed to start import:', error);
|
||||
this.error = error.message || 'Failed to start import';
|
||||
} finally {
|
||||
this.importing = false;
|
||||
@@ -175,7 +175,7 @@ function vendorMarketplace() {
|
||||
if (url) {
|
||||
this.importForm.csv_url = url;
|
||||
this.importForm.language = language;
|
||||
console.log('[VENDOR MARKETPLACE] Quick filled:', language, url);
|
||||
vendorMarketplaceLog.info('[VENDOR MARKETPLACE] Quick filled:', language, url);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -204,9 +204,9 @@ function vendorMarketplace() {
|
||||
this.selectedJob = response;
|
||||
}
|
||||
|
||||
console.log('[VENDOR MARKETPLACE] Refreshed job:', jobId);
|
||||
vendorMarketplaceLog.info('[VENDOR MARKETPLACE] Refreshed job:', jobId);
|
||||
} catch (error) {
|
||||
console.error('[VENDOR MARKETPLACE] Failed to refresh job:', error);
|
||||
vendorMarketplaceLog.error('[VENDOR MARKETPLACE] Failed to refresh job:', error);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -218,9 +218,9 @@ function vendorMarketplace() {
|
||||
const response = await apiClient.get(`/vendor/marketplace/imports/${jobId}`);
|
||||
this.selectedJob = response;
|
||||
this.showJobModal = true;
|
||||
console.log('[VENDOR MARKETPLACE] Viewing job details:', jobId);
|
||||
vendorMarketplaceLog.info('[VENDOR MARKETPLACE] Viewing job details:', jobId);
|
||||
} catch (error) {
|
||||
console.error('[VENDOR MARKETPLACE] Failed to load job details:', error);
|
||||
vendorMarketplaceLog.error('[VENDOR MARKETPLACE] Failed to load job details:', error);
|
||||
this.error = error.message || 'Failed to load job details';
|
||||
}
|
||||
},
|
||||
@@ -315,7 +315,7 @@ function vendorMarketplace() {
|
||||
);
|
||||
|
||||
if (hasActiveJobs) {
|
||||
console.log('[VENDOR MARKETPLACE] Auto-refreshing active jobs...');
|
||||
vendorMarketplaceLog.info('[VENDOR MARKETPLACE] Auto-refreshing active jobs...');
|
||||
await this.loadJobs();
|
||||
}
|
||||
}, 10000); // 10 seconds
|
||||
|
||||
Reference in New Issue
Block a user