mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
Forbid promise misuse (#6360)
This commit is contained in:
parent
abd3e66e20
commit
c5475f78ea
@ -34,20 +34,14 @@
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/no-explicit-any": "off", // TODO: This should be re-enabled
|
||||
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"error",
|
||||
{
|
||||
"accessibility": "no-public"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-this-alias": [
|
||||
"error",
|
||||
{
|
||||
"allowedNames": ["self"]
|
||||
}
|
||||
{ "accessibility": "no-public" }
|
||||
],
|
||||
"@typescript-eslint/no-explicit-any": "off", // TODO: This should be re-enabled
|
||||
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }],
|
||||
"@typescript-eslint/no-this-alias": ["error", { "allowedNames": ["self"] }],
|
||||
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
|
||||
"no-console": "error",
|
||||
"import/no-unresolved": "off", // TODO: Look into turning off once each package is an actual package.
|
||||
"import/order": [
|
||||
|
@ -205,6 +205,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
|
||||
if (
|
||||
options.cipher.type !== CipherType.Login ||
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
totpPromise ||
|
||||
!options.cipher.login.totp ||
|
||||
(!canAccessPremium && !options.cipher.organizationUseTotp)
|
||||
|
@ -116,6 +116,7 @@ export class NativeMessagingService {
|
||||
|
||||
switch (message.command) {
|
||||
case "biometricUnlock": {
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
if (!this.platformUtilService.supportsBiometric()) {
|
||||
return this.send({ command: "biometricUnlock", response: "not supported" }, appId);
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ export class UserSubscriptionComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
if (this.stateService.getHasPremiumPersonally()) {
|
||||
this.loading = true;
|
||||
this.sub = await this.apiService.getUserSubscription();
|
||||
|
@ -74,6 +74,7 @@ export class PremiumComponent implements OnInit {
|
||||
|
||||
try {
|
||||
if (this.selfHosted) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
if (!this.tokenService.getEmailVerified()) {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
|
@ -47,6 +47,7 @@ export class AddOrganizationComponent implements OnInit {
|
||||
}
|
||||
|
||||
async add(organization: Organization) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
if (this.formPromise) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user