DC-004: Fix all 19 ESLint warnings (zero remaining)
Removed unused imports (path, validateStartupConfig, platformPaths), renamed unused destructures (_timeout, _logEntry), replaced nested ternaries with lookup tables, added eslint-disable comments on require-await functions that are intentionally async for API stability, and extracted helper functions to reduce max-depth and complexity in app.js, dns.js, provider-dns.js, and site.js. All 879 tests pass.
This commit is contained in:
@@ -21,11 +21,8 @@ function createLogger(LOG_LEVEL) {
|
||||
|
||||
if (Object.keys(data).length) entry.data = data;
|
||||
|
||||
const fn = level === 'error'
|
||||
? console.error
|
||||
: level === 'warn'
|
||||
? console.warn
|
||||
: console.info;
|
||||
const logFns = { error: console.error, warn: console.warn, info: console.info, debug: console.info };
|
||||
const fn = logFns[level] || console.info;
|
||||
fn(JSON.stringify(entry));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user