Skip to content

Commit

Permalink
[PM-1512] Upgrade prettier (bitwarden#5028)
Browse files Browse the repository at this point in the history
* Upgrade prettier

* Lock prettier version
  • Loading branch information
Hinton authored Mar 21, 2023
1 parent 9c60b2b commit ff4293b
Show file tree
Hide file tree
Showing 107 changed files with 294 additions and 223 deletions.
2 changes: 1 addition & 1 deletion apps/browser/src/alarms/alarm-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { clearClipboardAlarmName } from "../autofill/clipboard";
import { BrowserApi } from "../browser/browserApi";

export const alarmKeys = [clearClipboardAlarmName] as const;
export type AlarmKeys = typeof alarmKeys[number];
export type AlarmKeys = (typeof alarmKeys)[number];

type AlarmState = { [T in AlarmKeys]: number | undefined };

Expand Down
2 changes: 1 addition & 1 deletion apps/browser/src/auth/popup/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<input id="email" type="email" formControlName="email" appInputVerbatim="false" />
</div>
<div class="box-footer no-margin" *ngIf="selfHostedDomain">
{{ "loggingInTo" | i18n: selfHostedDomain }}
{{ "loggingInTo" | i18n : selfHostedDomain }}
</div>
<div class="remember-email-check">
<input
Expand Down
2 changes: 1 addition & 1 deletion apps/browser/src/auth/popup/lock.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h1 class="center">
</div>
<div id="masterPasswordHelp" class="box-footer">
<p>{{ "yourVaultIsLocked" | i18n }}</p>
{{ "loggedInAsOn" | i18n: email:webVaultHostname }}
{{ "loggedInAsOn" | i18n : email : webVaultHostname }}
</div>
</div>
<div class="box" *ngIf="biometricLock">
Expand Down
2 changes: 1 addition & 1 deletion apps/browser/src/auth/popup/remove-password.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="box">
<div class="box-content">
<div class="box-content-row" appBoxRow>
<p>{{ "convertOrganizationEncryptionDesc" | i18n: organization.name }}</p>
<p>{{ "convertOrganizationEncryptionDesc" | i18n : organization.name }}</p>
</div>
<div class="box-content-row">
<button
Expand Down
2 changes: 1 addition & 1 deletion apps/browser/src/auth/popup/two-factor.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h1 class="center">
{{ "enterVerificationCodeApp" | i18n }}
</span>
<span *ngIf="selectedProviderType === providerType.Email">
{{ "enterVerificationCodeEmail" | i18n: twoFactorEmail }}
{{ "enterVerificationCodeEmail" | i18n : twoFactorEmail }}
</span>
</div>
<div class="box first">
Expand Down
2 changes: 1 addition & 1 deletion apps/browser/src/popup/components/send-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<span class="sr-only">{{ "pendingDeletion" | i18n }}</span>
</ng-container>
</span>
<span class="detail">{{ s.deletionDate | date: "medium" }}</span>
<span class="detail">{{ s.deletionDate | date : "medium" }}</span>
</div>
</button>
<div class="action-buttons">
Expand Down
8 changes: 4 additions & 4 deletions apps/browser/src/popup/settings/about.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<p class="text-center" *ngIf="isCloud">
{{ "serverVersion" | i18n }}: {{ this.serverConfig?.version }}
<span *ngIf="!serverConfig.isValid()">
({{ "lastSeenOn" | i18n: (serverConfig.utcDate | date: "mediumDate") }})
({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
</span>
</p>

Expand All @@ -24,19 +24,19 @@
{{ "serverVersion" | i18n }} <small>({{ "thirdParty" | i18n }})</small>:
{{ this.serverConfig?.version }}
<span *ngIf="!serverConfig.isValid()">
({{ "lastSeenOn" | i18n: (serverConfig.utcDate | date: "mediumDate") }})
({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
</span>
</p>
<div class="text-center">
<small>{{ "thirdPartyServerMessage" | i18n: serverConfig.server?.name }}</small>
<small>{{ "thirdPartyServerMessage" | i18n : serverConfig.server?.name }}</small>
</div>
</ng-container>

<p class="text-center" *ngIf="!serverConfig.server">
{{ "serverVersion" | i18n }} <small>({{ "selfHosted" | i18n }})</small>:
{{ this.serverConfig?.version }}
<span *ngIf="!serverConfig.isValid()">
({{ "lastSeenOn" | i18n: (serverConfig.utcDate | date: "mediumDate") }})
({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
</span>
</p>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1 class="center">
<i class="bwi bwi-minus-circle bwi-lg" aria-hidden="true"></i>
</button>
<div class="row-main">
<label for="excludedDomain{{ i }}">{{ "uriPosition" | i18n: i + 1 }}</label>
<label for="excludedDomain{{ i }}">{{ "uriPosition" | i18n : i + 1 }}</label>
<input
id="excludedDomain{{ i }}"
name="excludedDomain{{ i }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<app-callout type="info" *ngIf="vaultTimeoutPolicy">
{{ "vaultTimeoutPolicyInEffect" | i18n: vaultTimeoutPolicyHours:vaultTimeoutPolicyMinutes }}
{{ "vaultTimeoutPolicyInEffect" | i18n : vaultTimeoutPolicyHours : vaultTimeoutPolicyMinutes }}
</app-callout>

<div [formGroup]="form">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1 class="center">
appSelectCopy
[innerHTML]="h.password | colorPassword"
></div>
<span class="detail">{{ h.date | date: "medium" }}</span>
<span class="detail">{{ h.date | date : "medium" }}</span>
</div>
</div>
<div class="action-buttons">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ <h2 class="box-header">
type="text"
name="Card.ExpYear"
[(ngModel)]="cipher.card.expYear"
placeholder="{{ 'ex' | i18n }} {{ currentDate | date: 'yyyy' }}"
placeholder="{{ 'ex' | i18n }} {{ currentDate | date : 'yyyy' }}"
[readonly]="!cipher.edit && editMode"
/>
</div>
Expand Down Expand Up @@ -470,7 +470,7 @@ <h2 class="box-header">
class="box-content-row box-content-row-multi"
appBoxRow
*ngFor="let u of cipher.login.uris; let i = index; trackBy: trackByFunction"
attr.aria-label="{{ 'uriPosition' | i18n: i + 1 }}"
attr.aria-label="{{ 'uriPosition' | i18n : i + 1 }}"
>
<button
type="button"
Expand All @@ -481,7 +481,7 @@ <h2 class="box-header">
<i class="bwi bwi-minus-circle bwi-lg" aria-hidden="true"></i>
</button>
<div class="row-main">
<label for="loginUri{{ i }}">{{ "uriPosition" | i18n: i + 1 }}</label>
<label for="loginUri{{ i }}">{{ "uriPosition" | i18n : i + 1 }}</label>
<input
id="loginUri{{ i }}"
type="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1 class="center">
class="text monospaced no-ellipsis"
[innerHTML]="h.password | colorPassword"
></span>
<span class="detail">{{ h.lastUsedDate | date: "medium" }}</span>
<span class="detail">{{ h.lastUsedDate | date : "medium" }}</span>
</div>
</div>
<div class="action-buttons">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ <h2 class="box-header">
>{{ "number" | i18n }}</span
>
<span [hidden]="showCardNumber" class="monospaced">{{
cipher.card.maskedNumber | creditCardNumber: cipher.card.brand
cipher.card.maskedNumber | creditCardNumber : cipher.card.brand
}}</span>
<span [hidden]="!showCardNumber" class="monospaced">{{
cipher.card.number | creditCardNumber: cipher.card.brand
cipher.card.number | creditCardNumber : cipher.card.brand
}}</span>
</div>
<div class="action-buttons">
Expand Down Expand Up @@ -642,15 +642,15 @@ <h2 class="box-header">
<div class="box-footer">
<div>
<b class="font-weight-semibold">{{ "dateUpdated" | i18n }}:</b>
{{ cipher.revisionDate | date: "medium" }}
{{ cipher.revisionDate | date : "medium" }}
</div>
<div *ngIf="cipher.creationDate">
<b class="font-weight-semibold">{{ "dateCreated" | i18n }}:</b>
{{ cipher.creationDate | date: "medium" }}
{{ cipher.creationDate | date : "medium" }}
</div>
<div *ngIf="cipher.passwordRevisionDisplayDate">
<b class="font-weight-semibold">{{ "datePasswordUpdated" | i18n }}:</b>
{{ cipher.passwordRevisionDisplayDate | date: "medium" }}
{{ cipher.passwordRevisionDisplayDate | date : "medium" }}
</div>
<div *ngIf="cipher.hasPasswordHistory">
<b class="font-weight-semibold">{{ "passwordHistory" | i18n }}:</b>
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/commands/completion.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const validShells = ["zsh"];

export class CompletionCommand {
async run(options: program.OptionValues) {
const shell: typeof validShells[number] = options.shell;
const shell: (typeof validShells)[number] = options.shell;

if (!shell) {
return Response.badRequest("`shell` option was not provided.");
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/app/accounts/settings.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="modal-body form">
<div class="box">
<h1 class="box-header" id="settingsTitle">
{{ "settingsTitle" | i18n: currentUserEmail }}
{{ "settingsTitle" | i18n : currentUserEmail }}
</h1>
<div class="box-content box-content-padded">
<h2>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<app-callout type="info" *ngIf="vaultTimeoutPolicy">
{{ "vaultTimeoutPolicyInEffect" | i18n: vaultTimeoutPolicyHours:vaultTimeoutPolicyMinutes }}
{{ "vaultTimeoutPolicyInEffect" | i18n : vaultTimeoutPolicyHours : vaultTimeoutPolicyMinutes }}
</app-callout>

<div [formGroup]="form">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
*ngFor="let a of accounts | keyvalue"
class="account"
(click)="switch(a.key)"
appA11yTitle="{{ 'loggedInAsOn' | i18n: a.value.profile.email:a.value.serverUrl }}"
appA11yTitle="{{ 'loggedInAsOn' | i18n : a.value.profile.email : a.value.serverUrl }}"
attr.aria-label="{{ 'switchAccount' | i18n }}"
>
<app-avatar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1 class="box-header" id="passwordGenHistoryTitle">
appSelectCopy
[innerHTML]="h.password | colorPassword"
></div>
<span class="detail">{{ h.date | date: "medium" }}</span>
<span class="detail">{{ h.date | date : "medium" }}</span>
</div>
<div class="action-buttons">
<button
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/auth/lock.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</div>
</div>
<div id="masterPasswordHelp" class="box-footer">
{{ "loggedInAsOn" | i18n: email:webVaultHostname }}
{{ "loggedInAsOn" | i18n : email : webVaultHostname }}
</div>
</div>
<div class="buttons with-rows">
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/auth/login/login-approval.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
<div class="content">
<div class="section">
<h4>{{ "logInAttemptBy" | i18n: email }}</h4>
<h4>{{ "logInAttemptBy" | i18n : email }}</h4>
</div>

<div class="section">
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/auth/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</div>
</div>
<div class="box-footer" *ngIf="selfHostedDomain">
{{ "loggingInTo" | i18n: selfHostedDomain }}
{{ "loggingInTo" | i18n : selfHostedDomain }}
</div>
</div>
<div class="checkbox remember-email">
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/auth/remove-password.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="remove-password-page" *ngIf="!loading">
<div class="content">
<h1>{{ "removeMasterPassword" | i18n }}</h1>
<p>{{ "convertOrganizationEncryptionDesc" | i18n: organization.name }}</p>
<p>{{ "convertOrganizationEncryptionDesc" | i18n : organization.name }}</p>
<div class="buttons">
<button
type="submit"
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/auth/two-factor.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>{{ title }}</h1>
{{ "enterVerificationCodeApp" | i18n }}
</p>
<p *ngIf="selectedProviderType === providerType.Email">
{{ "enterVerificationCodeEmail" | i18n: twoFactorEmail }}
{{ "enterVerificationCodeEmail" | i18n : twoFactorEmail }}
</p>
<div
class="box last"
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/vault/app/accounts/premium.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1 class="box-header" id="premiumTitle">
</li>
</ul>
<p class="text-center lead no-margin">
{{ "premiumPrice" | i18n: (price | currency: "$") }}
{{ "premiumPrice" | i18n : (price | currency : "$") }}
</p>
</div>
<div *ngIf="isPremium">
Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/src/vault/app/vault/add-edit.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ <h2 class="box-header">
type="text"
name="Card.ExpYear"
[(ngModel)]="cipher.card.expYear"
placeholder="{{ 'ex' | i18n }} {{ currentDate | date: 'yyyy' }}"
placeholder="{{ 'ex' | i18n }} {{ currentDate | date : 'yyyy' }}"
[readonly]="!cipher.edit && editMode"
/>
</div>
Expand Down Expand Up @@ -457,7 +457,7 @@ <h2 class="box-header">
class="box-content-row box-content-row-multi"
appBoxRow
*ngFor="let u of cipher.login.uris; let i = index; trackBy: trackByFunction"
attr.aria-label="{{ 'uriPosition' | i18n: i + 1 }}"
attr.aria-label="{{ 'uriPosition' | i18n : i + 1 }}"
>
<button
type="button"
Expand All @@ -469,7 +469,7 @@ <h2 class="box-header">
<i class="bwi bwi-minus-circle bwi-lg" aria-hidden="true"></i>
</button>
<div class="row-main">
<label for="loginUri{{ i }}">{{ "uriPosition" | i18n: i + 1 }}</label>
<label for="loginUri{{ i }}">{{ "uriPosition" | i18n : i + 1 }}</label>
<input
id="loginUri{{ i }}"
type="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1 class="box-header" id="passwordHistoryTitle">
<div class="box-content-row box-content-row-flex" *ngFor="let h of history">
<div class="row-main">
<span class="text monospaced" [innerHTML]="h.password | colorPassword"></span>
<span class="detail">{{ h.lastUsedDate | date: "medium" }}</span>
<span class="detail">{{ h.lastUsedDate | date : "medium" }}</span>
</div>
<div class="action-buttons">
<button
Expand Down
10 changes: 5 additions & 5 deletions apps/desktop/src/vault/app/vault/view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ <h2 class="box-header">
>{{ "number" | i18n }}</span
>
<span *ngIf="!showCardNumber" class="monospaced">{{
cipher.card.maskedNumber | creditCardNumber: cipher.card.brand
cipher.card.maskedNumber | creditCardNumber : cipher.card.brand
}}</span>
<span *ngIf="showCardNumber" class="monospaced">{{
cipher.card.number | creditCardNumber: cipher.card.brand
cipher.card.number | creditCardNumber : cipher.card.brand
}}</span>
</div>
<div class="action-buttons">
Expand Down Expand Up @@ -505,15 +505,15 @@ <h2 class="box-header">
<div class="box-footer">
<div>
<b class="font-weight-semibold">{{ "dateUpdated" | i18n }}:</b>
{{ cipher.revisionDate | date: "medium" }}
{{ cipher.revisionDate | date : "medium" }}
</div>
<div *ngIf="cipher.creationDate">
<b class="font-weight-semibold">{{ "dateCreated" | i18n }}:</b>
{{ cipher.creationDate | date: "medium" }}
{{ cipher.creationDate | date : "medium" }}
</div>
<div *ngIf="cipher.passwordRevisionDisplayDate">
<b class="font-weight-semibold">{{ "datePasswordUpdated" | i18n }}:</b>
{{ cipher.passwordRevisionDisplayDate | date: "medium" }}
{{ cipher.passwordRevisionDisplayDate | date : "medium" }}
</div>
<div *ngIf="cipher.hasPasswordHistory">
<b class="font-weight-semibold">{{ "passwordHistory" | i18n }}:</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ <h2 class="tw-mb-3 tw-text-base tw-font-semibold">{{ "billingPlanLabel" | i18n }
{{ "annual" | i18n }} -
{{
(selectablePlan.basePrice === 0 ? selectablePlan.seatPrice : selectablePlan.basePrice)
| currency: "$"
| currency : "$"
}}
/{{ "yr" | i18n }}
</ng-container>
<ng-container *ngIf="!selectablePlan.isAnnual">
{{ "monthly" | i18n }} -
{{
(selectablePlan.basePrice === 0 ? selectablePlan.seatPrice : selectablePlan.basePrice)
| currency: "$"
| currency : "$"
}}
/{{ "monthAbbr" | i18n }}
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="tw-pl-6 tw-pb-6">
<p class="tw-text-xl">{{ "trialThankYou" | i18n: orgLabel }}</p>
<p class="tw-text-xl">{{ "trialThankYou" | i18n : orgLabel }}</p>
<ul class="tw-list-disc">
<li>
<p>
Expand All @@ -10,7 +10,7 @@
</li>
<li>
<p>
{{ "trialPaidInfoMessage" | i18n: orgLabel }}
{{ "trialPaidInfoMessage" | i18n : orgLabel }}
</p>
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
>
<div class="tw-py-2 tw-px-5">
<i class="bwi bwi-exclamation-triangle" aria-hidden="true"></i>
{{ "accessingUsingProvider" | i18n: activeOrganization.providerName }}
{{ "accessingUsingProvider" | i18n : activeOrganization.providerName }}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/layouts/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="col">&copy; {{ year }} Bitwarden Inc.</div>
<div class="col text-center"></div>
<div class="col text-right">
{{ "versionNumber" | i18n: version }}
{{ "versionNumber" | i18n : version }}
</div>
</div>
</div>
Loading

0 comments on commit ff4293b

Please sign in to comment.