Skip to content

Commit 310e561

Browse files
committed
Fix lint errors
- Use dot notation for QUERY_TAGS configuration access - Convert serializeQueryTags to default export Co-authored-by: Isaac Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
1 parent 9aba22b commit 310e561

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/DBSQLClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@ export default class DBSQLClient extends EventEmitter implements IDBSQLClient, I
296296
if (request.queryTags !== undefined) {
297297
const serialized = serializeQueryTags(request.queryTags);
298298
if (serialized) {
299-
configuration['QUERY_TAGS'] = serialized;
299+
configuration.QUERY_TAGS = serialized;
300300
} else {
301-
delete configuration['QUERY_TAGS'];
301+
delete configuration.QUERY_TAGS;
302302
}
303303
}
304304

lib/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import buildUserAgentString from './buildUserAgentString';
33
import formatProgress, { ProgressUpdateTransformer } from './formatProgress';
44
import LZ4 from './lz4';
55
import * as ProtocolVersion from './protocolVersion';
6-
import { serializeQueryTags } from './queryTags';
6+
import serializeQueryTags from './queryTags';
77

88
export {
99
definedOrError,

lib/utils/queryTags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @param queryTags - dictionary of query tag key-value pairs
1010
* @returns serialized string, or undefined if input is empty/null/undefined
1111
*/
12-
export function serializeQueryTags(
12+
export default function serializeQueryTags(
1313
queryTags: Record<string, string | null | undefined> | null | undefined,
1414
): string | undefined {
1515
if (queryTags == null) {

tests/unit/utils/queryTags.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'chai';
2-
import { serializeQueryTags } from '../../../lib/utils/queryTags';
2+
import serializeQueryTags from '../../../lib/utils/queryTags';
33

44
describe('serializeQueryTags', () => {
55
it('should return undefined for null input', () => {

0 commit comments

Comments
 (0)