fix(js): replace console.log with centralized logger (JS-002)

Convert direct console.log/error/warn calls to use centralized logger:
- imports.js: 13 violations fixed using adminImportsLog
- vendor-themes.js: 5 violations fixed using vendorThemesLog
- code-quality-dashboard.js: 2 violations fixed using codeQualityLog
- code-quality-violations.js: 1 violation fixed using codeQualityViolationsLog
- settings.js: 1 violation fixed using settingsLog

All files now use window.LogConfig.loggers.* for consistent logging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-03 21:31:48 +01:00
parent 96bdb07fb2
commit dd0ba1ed5e
5 changed files with 31 additions and 22 deletions

View File

@@ -3,6 +3,9 @@
* Manages the violations list page with filtering and pagination
*/
// ✅ Use centralized logger
const codeQualityViolationsLog = window.LogConfig.createLogger('CODE-QUALITY');
function codeQualityViolations() {
return {
// Extend base data
@@ -68,7 +71,7 @@ function codeQualityViolations() {
// Update URL with current filters (without reloading)
this.updateURL();
} catch (err) {
console.error('Failed to load violations:', err);
codeQualityViolationsLog.error('Failed to load violations:', err);
this.error = err.message;
// Redirect to login if unauthorized