Skip to content

Commit 2a89356

Browse files
committed
Lint nits
1 parent e2bf576 commit 2a89356

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

src/constants.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ const ERROR_NO_MANIFEST_FILES = 'No manifest files found'
195195
const ERROR_NO_PACKAGE_JSON = 'No package.json found'
196196
const ERROR_NO_REPO_FOUND = 'No repo found'
197197
const ERROR_NO_SOCKET_DIR = 'No .socket directory found'
198-
const ERROR_UNABLE_RESOLVE_ORG = 'Unable to resolve a Socket account organization'
198+
const ERROR_UNABLE_RESOLVE_ORG =
199+
'Unable to resolve a Socket account organization'
199200
const EXT_YAML = '.yaml'
200201
const EXT_YML = '.yml'
201202
const FLAG_CONFIG = '--config'

src/utils/config.mts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ export interface LocalConfig {
3434
org?: string | undefined
3535
}
3636

37-
const sensitiveConfigKeyLookup: Set<keyof LocalConfig> = new Set([CONFIG_KEY_API_TOKEN])
37+
const sensitiveConfigKeyLookup: Set<keyof LocalConfig> = new Set([
38+
CONFIG_KEY_API_TOKEN,
39+
])
3840

3941
const supportedConfig: Map<keyof LocalConfig, string> = new Map([
4042
[CONFIG_KEY_API_BASE_URL, 'Base URL of the Socket API endpoint'],
@@ -101,7 +103,11 @@ function normalizeConfigKey(
101103
// property apiKey, we'll copy that to apiToken and delete the old property.
102104
// We added `org` as a convenience alias for `defaultOrg`
103105
const normalizedKey =
104-
key === 'apiKey' ? CONFIG_KEY_API_TOKEN : key === CONFIG_KEY_ORG ? CONFIG_KEY_DEFAULT_ORG : key
106+
key === 'apiKey'
107+
? CONFIG_KEY_API_TOKEN
108+
: key === CONFIG_KEY_ORG
109+
? CONFIG_KEY_DEFAULT_ORG
110+
: key
105111
if (!isSupportedConfigKey(normalizedKey)) {
106112
return {
107113
ok: false,

src/utils/sdk.mts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ const TOKEN_VISIBLE_LENGTH = 5
2222
// The Socket API server that should be used for operations.
2323
export function getDefaultApiBaseUrl(): string | undefined {
2424
const baseUrl =
25-
constants.ENV.SOCKET_CLI_API_BASE_URL || getConfigValueOrUndef(CONFIG_KEY_API_BASE_URL)
25+
constants.ENV.SOCKET_CLI_API_BASE_URL ||
26+
getConfigValueOrUndef(CONFIG_KEY_API_BASE_URL)
2627
return isUrl(baseUrl) ? baseUrl : undefined
2728
}
2829

2930
// The Socket API server that should be used for operations.
3031
export function getDefaultProxyUrl(): string | undefined {
3132
const apiProxy =
32-
constants.ENV.SOCKET_CLI_API_PROXY || getConfigValueOrUndef(CONFIG_KEY_API_PROXY)
33+
constants.ENV.SOCKET_CLI_API_PROXY ||
34+
getConfigValueOrUndef(CONFIG_KEY_API_PROXY)
3335
return isUrl(apiProxy) ? apiProxy : undefined
3436
}
3537

0 commit comments

Comments
 (0)