Skip to content

Commit

Permalink
[eslint] disallow unused collections, enable `no-inverted-boolean-che…
Browse files Browse the repository at this point in the history
…ck` rule (#4974)
  • Loading branch information
dimaMachina authored Oct 21, 2024
1 parent 3cb8861 commit a5eb78a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ module.exports = {
},
],
'@typescript-eslint/no-floating-promises': 'error',
'sonarjs/no-unused-collection': 'warn',
'sonarjs/no-inverted-boolean-check': 'warn',
...rulesToExtends,
'no-lonely-if': 'off',
'object-shorthand': 'off',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1302,14 +1302,6 @@ export class SchemaPublisher {
})
: null;

const contractIdToLatestValidContractVersionId = new Map<string, string | null>();
for (const contract of contracts ?? []) {
contractIdToLatestValidContractVersionId.set(
contract.contract.id,
contract.latestValidVersion?.id ?? null,
);
}

const deleteResult = await this.models[project.type][modelVersion].delete({
input: {
serviceName: input.serviceName,
Expand Down Expand Up @@ -1648,14 +1640,6 @@ export class SchemaPublisher {
})
: null;

const contractIdToLatestValidContractVersionId = new Map<string, string | null>();
for (const contract of contracts ?? []) {
contractIdToLatestValidContractVersionId.set(
contract.contract.id,
contract.latestValidVersion?.id ?? null,
);
}

const compareToPreviousComposableVersion = shouldUseLatestComposableVersion(
target.id,
project,
Expand Down
2 changes: 1 addition & 1 deletion packages/services/emails/src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const emailProviderConfig =
pass: email.EMAIL_PROVIDER_SMTP_AUTH_PASSWORD,
},
tls: {
rejectUnauthorized: !(email.EMAIL_PROVIDER_SMTP_REJECT_UNAUTHORIZED === '0'),
rejectUnauthorized: email.EMAIL_PROVIDER_SMTP_REJECT_UNAUTHORIZED !== '0',
},
} as const)
: email.EMAIL_PROVIDER === 'sendmail'
Expand Down

0 comments on commit a5eb78a

Please sign in to comment.