Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kibertoad committed Feb 22, 2024
1 parent feabada commit 06795a5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/sqs/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-explicit-any": "warn",
Expand Down
7 changes: 6 additions & 1 deletion packages/sqs/lib/utils/sqsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export async function assertQueue(
) {
// we will try to update existing queue if exists
if (extraParams?.updateAttributesIfExists) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const queueExistsResult = await getQueueUrl(sqsClient, queueConfig.QueueName!)

if (queueExistsResult.result) {
Expand All @@ -97,7 +98,11 @@ export async function assertQueue(
queueUrl,
})

const queueArn = existingAttributes.result?.attributes!.QueueArn
if (!existingAttributes.result?.attributes) {
throw new Error('Attributes are not set')
}

const queueArn = existingAttributes.result?.attributes.QueueArn
if (!queueArn) {
throw new Error('Queue ARN was not set')
}
Expand Down
6 changes: 3 additions & 3 deletions packages/sqs/vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export default defineConfig({
globals: true,
poolOptions: {
threads: {
singleThread: true
}
singleThread: true,
},
},
watch: false,
environment: 'node',
Expand All @@ -21,7 +21,7 @@ export default defineConfig({
functions: 100,
branches: 74,
statements: 90,
}
},
},
},
})

0 comments on commit 06795a5

Please sign in to comment.