superset-websocket/src/config.ts
envVarConfigSetter
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
Open
const envVarConfigSetter: { [envVar: string]: (val: string) => void } = {
PORT: val => (config.port = toNumber(val)),
LOG_LEVEL: val => (config.logLevel = val),
LOG_TO_FILE: val => (config.logToFile = toBoolean(val)),
LOG_FILENAME: val => (config.logFilename = val),
Function applyEnvOverrides
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function applyEnvOverrides(config: ConfigType): ConfigType {
const envVarConfigSetter: { [envVar: string]: (val: string) => void } = {
PORT: val => (config.port = toNumber(val)),
LOG_LEVEL: val => (config.logLevel = val),
LOG_TO_FILE: val => (config.logToFile = toBoolean(val)),
Function defaultConfig
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defaultConfig(): ConfigType {
return {
port: 8080,
logLevel: 'info',
logToFile: false,