[eslint] disallow unused collections, enable no-inverted-boolean-check rule (#4974)

This commit is contained in:
Dimitri POSTOLOV 2024-10-21 12:57:33 +03:00 committed by GitHub
parent 3cb8861df0
commit a5eb78abf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 17 deletions

View file

@ -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',

View file

@ -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,
@ -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,

View file

@ -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'