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:
16
static/vendor/js/billing.js
vendored
16
static/vendor/js/billing.js
vendored
@@ -1,6 +1,8 @@
|
||||
// static/vendor/js/billing.js
|
||||
// Vendor billing and subscription management
|
||||
|
||||
const billingLog = window.LogConfig?.createLogger('BILLING') || console;
|
||||
|
||||
function billingData() {
|
||||
return {
|
||||
// State
|
||||
@@ -60,7 +62,7 @@ function billingData() {
|
||||
this.invoices = invoicesRes.invoices || [];
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error loading billing data:', error);
|
||||
billingLog.error('Error loading billing data:', error);
|
||||
this.showNotification('Failed to load billing data', 'error');
|
||||
} finally {
|
||||
this.loading = false;
|
||||
@@ -80,7 +82,7 @@ function billingData() {
|
||||
window.location.href = response.checkout_url;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error creating checkout:', error);
|
||||
billingLog.error('Error creating checkout:', error);
|
||||
this.showNotification('Failed to create checkout session', 'error');
|
||||
}
|
||||
},
|
||||
@@ -92,7 +94,7 @@ function billingData() {
|
||||
window.location.href = response.portal_url;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error opening portal:', error);
|
||||
billingLog.error('Error opening portal:', error);
|
||||
this.showNotification('Failed to open payment portal', 'error');
|
||||
}
|
||||
},
|
||||
@@ -109,7 +111,7 @@ function billingData() {
|
||||
await this.loadData();
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error cancelling subscription:', error);
|
||||
billingLog.error('Error cancelling subscription:', error);
|
||||
this.showNotification('Failed to cancel subscription', 'error');
|
||||
}
|
||||
},
|
||||
@@ -121,7 +123,7 @@ function billingData() {
|
||||
await this.loadData();
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error reactivating subscription:', error);
|
||||
billingLog.error('Error reactivating subscription:', error);
|
||||
this.showNotification('Failed to reactivate subscription', 'error');
|
||||
}
|
||||
},
|
||||
@@ -138,7 +140,7 @@ function billingData() {
|
||||
window.location.href = response.checkout_url;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error purchasing addon:', error);
|
||||
billingLog.error('Error purchasing addon:', error);
|
||||
this.showNotification('Failed to purchase add-on', 'error');
|
||||
} finally {
|
||||
this.purchasingAddon = null;
|
||||
@@ -155,7 +157,7 @@ function billingData() {
|
||||
this.showNotification('Add-on cancelled successfully', 'success');
|
||||
await this.loadData();
|
||||
} catch (error) {
|
||||
console.error('Error cancelling addon:', error);
|
||||
billingLog.error('Error cancelling addon:', error);
|
||||
this.showNotification('Failed to cancel add-on', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user