Skip to content

Commit 22d9637

Browse files
author
Vikram Kalta
committed
fix: eslint fixes
1 parent 71705ca commit 22d9637

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/lib/stack/client.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ export async function getGlobalFields(config: StackConnectionConfig) {
7070
})
7171
res.on('end', () => {
7272
if (res.statusCode === 200) {
73-
try {
74-
resolve(JSON.parse(body))
75-
} catch (error) {
76-
reject('Parse error')
77-
}
73+
resolve(JSON.parse(body))
7874
} else {
7975
reject(body)
8076
}

src/lib/tsgen/factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export default function (userOptions: TSGenOptions) {
297297
}
298298

299299
return function (contentType: ContentstackTypes.ContentType): TSGenResult|any {
300-
if (contentType.schema_type == 'global_field') {
300+
if (contentType.schema_type === 'global_field') {
301301
const name = name_type(contentType.uid)
302302
if (!cachedGlobalFields[name]) {
303303
cachedGlobalFields[name] = {

0 commit comments

Comments
 (0)