1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

[PM-1512] Upgrade prettier (#5028)

* Upgrade prettier

* Lock prettier version
This commit is contained in:
Oscar Hinton
2023-03-21 11:28:15 +01:00
committed by GitHub
parent 9c60b2b54a
commit ff4293b7bd
107 changed files with 294 additions and 223 deletions

View File

@@ -2,7 +2,7 @@ import { clearClipboardAlarmName } from "../autofill/clipboard";
import { BrowserApi } from "../browser/browserApi"; import { BrowserApi } from "../browser/browserApi";
export const alarmKeys = [clearClipboardAlarmName] as const; 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 }; type AlarmState = { [T in AlarmKeys]: number | undefined };

View File

@@ -20,7 +20,7 @@ const validShells = ["zsh"];
export class CompletionCommand { export class CompletionCommand {
async run(options: program.OptionValues) { async run(options: program.OptionValues) {
const shell: typeof validShells[number] = options.shell; const shell: (typeof validShells)[number] = options.shell;
if (!shell) { if (!shell) {
return Response.badRequest("`shell` option was not provided."); return Response.badRequest("`shell` option was not provided.");

View File

@@ -53,7 +53,9 @@
<ng-container <ng-container
*ngIf=" *ngIf="
!loading && !loading &&
(isPaging() ? pagedUsers : (users | search: searchText:'name':'email':'id')) as searchedUsers (isPaging()
? pagedUsers
: (users | search : searchText : 'name' : 'email' : 'id')) as searchedUsers
" "
> >
<p *ngIf="!searchedUsers.length">{{ "noMembersInList" | i18n }}</p> <p *ngIf="!searchedUsers.length">{{ "noMembersInList" | i18n }}</p>

View File

@@ -210,7 +210,8 @@
<ng-container *ngIf="selectablePlan.isAnnual"> <ng-container *ngIf="selectablePlan.isAnnual">
{{ "annually" | i18n }} {{ "annually" | i18n }}
<small *ngIf="selectablePlan.basePrice"> <small *ngIf="selectablePlan.basePrice">
{{ "basePrice" | i18n }}: {{ selectablePlan.basePrice / 12 | currency: "$" }} &times; 12 {{ "basePrice" | i18n }}: {{ selectablePlan.basePrice / 12 | currency : "$" }} &times;
12
{{ "monthAbbr" | i18n }} {{ "monthAbbr" | i18n }}
= =
<ng-container *ngIf="acceptingSponsorship; else notAcceptingSponsorship"> <ng-container *ngIf="acceptingSponsorship; else notAcceptingSponsorship">

View File

@@ -45,7 +45,9 @@
</li> </li>
</ul> </ul>
<p class="text-lg" [ngClass]="{ 'mb-0': !selfHosted }"> <p class="text-lg" [ngClass]="{ 'mb-0': !selfHosted }">
{{ "premiumPriceWithFamilyPlan" | i18n: (premiumPrice | currency: "$"):familyPlanMaxUserCount }} {{
"premiumPriceWithFamilyPlan" | i18n : (premiumPrice | currency : "$") : familyPlanMaxUserCount
}}
<a routerLink="/create-organization" [queryParams]="{ plan: 'families' }">{{ <a routerLink="/create-organization" [queryParams]="{ plan: 'families' }">{{
"bitwardenFamiliesPlan" | i18n "bitwardenFamiliesPlan" | i18n
}}</a> }}</a>

View File

@@ -5,7 +5,7 @@ export const All = "all";
// TODO: Remove `All` when moving to vertical navigation. // TODO: Remove `All` when moving to vertical navigation.
const itemTypes = ["favorites", "login", "card", "identity", "note", "trash", All] as const; const itemTypes = ["favorites", "login", "card", "identity", "note", "trash", All] as const;
export type RoutedVaultFilterItemType = typeof itemTypes[number]; export type RoutedVaultFilterItemType = (typeof itemTypes)[number];
export function isRoutedVaultFilterItemType(value: unknown): value is RoutedVaultFilterItemType { export function isRoutedVaultFilterItemType(value: unknown): value is RoutedVaultFilterItemType {
return itemTypes.includes(value as any); return itemTypes.includes(value as any);

View File

@@ -350,4 +350,4 @@ $themes: (
@function themed($key) { @function themed($key) {
@return map-get($theme-map, $key); @return map-get($theme-map, $key);
} ; }

View File

@@ -100,7 +100,9 @@
<ng-container <ng-container
*ngIf=" *ngIf="
!loading && !loading &&
(isPaging() ? pagedUsers : (users | search: searchText:'name':'email':'id')) as searchedUsers (isPaging()
? pagedUsers
: (users | search : searchText : 'name' : 'email' : 'id')) as searchedUsers
" "
> >
<p *ngIf="!searchedUsers.length">{{ "noUsersInList" | i18n }}</p> <p *ngIf="!searchedUsers.length">{{ "noUsersInList" | i18n }}</p>

View File

@@ -10,7 +10,9 @@
<bit-callout type="info" [title]="'accessTokenCallOutTitle' | i18n"> <bit-callout type="info" [title]="'accessTokenCallOutTitle' | i18n">
{{ "downloadAccessToken" | i18n }}<br /> {{ "downloadAccessToken" | i18n }}<br />
{{ "expiresOnAccessToken" | i18n }} {{ "expiresOnAccessToken" | i18n }}
{{ data.expirationDate === null ? ("never" | i18n) : (data.expirationDate | date: "medium") }} {{
data.expirationDate === null ? ("never" | i18n) : (data.expirationDate | date : "medium")
}}
</bit-callout> </bit-callout>
<bit-form-field class="tw-mb-0"> <bit-form-field class="tw-mb-0">

View File

@@ -72,5 +72,5 @@ export const regularImportOptions = [
] as const; ] as const;
export type ImportType = export type ImportType =
| typeof featuredImportOptions[number]["id"] | (typeof featuredImportOptions)[number]["id"]
| typeof regularImportOptions[number]["id"]; | (typeof regularImportOptions)[number]["id"];

View File

@@ -354,4 +354,4 @@ $themes: (
@function themed($key) { @function themed($key) {
@return map-get($theme-map, $key); @return map-get($theme-map, $key);
} ; }

92
package-lock.json generated
View File

@@ -155,8 +155,8 @@
"pkg": "5.8.0", "pkg": "5.8.0",
"postcss": "^8.4.14", "postcss": "^8.4.14",
"postcss-loader": "^7.0.1", "postcss-loader": "^7.0.1",
"prettier": "^2.7.1", "prettier": "2.8.4",
"prettier-plugin-tailwindcss": "^0.1.13", "prettier-plugin-tailwindcss": "^0.2.5",
"process": "^0.11.10", "process": "^0.11.10",
"regedit": "^3.0.3", "regedit": "^3.0.3",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
@@ -35933,9 +35933,9 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "2.7.1", "version": "2.8.4",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
"dev": true, "dev": true,
"bin": { "bin": {
"prettier": "bin-prettier.js" "prettier": "bin-prettier.js"
@@ -35948,15 +35948,77 @@
} }
}, },
"node_modules/prettier-plugin-tailwindcss": { "node_modules/prettier-plugin-tailwindcss": {
"version": "0.1.13", "version": "0.2.5",
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.1.13.tgz", "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.2.5.tgz",
"integrity": "sha512-/EKQURUrxLu66CMUg4+1LwGdxnz8of7IDvrSLqEtDqhLH61SAlNNUSr90UTvZaemujgl3OH/VHg+fyGltrNixw==", "integrity": "sha512-vZ/iKieyCx0WTxHbkf5E1rBlv/ybFk8WTT4hL5W2jlVxum2Zbe0jMUpuQdDrpa4z2vnPiJ5KIWCqL/kd16fKYg==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=12.17.0" "node": ">=12.17.0"
}, },
"peerDependencies": { "peerDependencies": {
"prettier": ">=2.2.0" "@ianvs/prettier-plugin-sort-imports": "*",
"@prettier/plugin-php": "*",
"@prettier/plugin-pug": "*",
"@shopify/prettier-plugin-liquid": "*",
"@shufo/prettier-plugin-blade": "*",
"@trivago/prettier-plugin-sort-imports": "*",
"prettier": ">=2.2.0",
"prettier-plugin-astro": "*",
"prettier-plugin-css-order": "*",
"prettier-plugin-import-sort": "*",
"prettier-plugin-jsdoc": "*",
"prettier-plugin-organize-attributes": "*",
"prettier-plugin-organize-imports": "*",
"prettier-plugin-style-order": "*",
"prettier-plugin-svelte": "*",
"prettier-plugin-twig-melody": "*"
},
"peerDependenciesMeta": {
"@ianvs/prettier-plugin-sort-imports": {
"optional": true
},
"@prettier/plugin-php": {
"optional": true
},
"@prettier/plugin-pug": {
"optional": true
},
"@shopify/prettier-plugin-liquid": {
"optional": true
},
"@shufo/prettier-plugin-blade": {
"optional": true
},
"@trivago/prettier-plugin-sort-imports": {
"optional": true
},
"prettier-plugin-astro": {
"optional": true
},
"prettier-plugin-css-order": {
"optional": true
},
"prettier-plugin-import-sort": {
"optional": true
},
"prettier-plugin-jsdoc": {
"optional": true
},
"prettier-plugin-organize-attributes": {
"optional": true
},
"prettier-plugin-organize-imports": {
"optional": true
},
"prettier-plugin-style-order": {
"optional": true
},
"prettier-plugin-svelte": {
"optional": true
},
"prettier-plugin-twig-melody": {
"optional": true
}
} }
}, },
"node_modules/pretty-bytes": { "node_modules/pretty-bytes": {
@@ -71231,15 +71293,15 @@
"dev": true "dev": true
}, },
"prettier": { "prettier": {
"version": "2.7.1", "version": "2.8.4",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
"dev": true "dev": true
}, },
"prettier-plugin-tailwindcss": { "prettier-plugin-tailwindcss": {
"version": "0.1.13", "version": "0.2.5",
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.1.13.tgz", "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.2.5.tgz",
"integrity": "sha512-/EKQURUrxLu66CMUg4+1LwGdxnz8of7IDvrSLqEtDqhLH61SAlNNUSr90UTvZaemujgl3OH/VHg+fyGltrNixw==", "integrity": "sha512-vZ/iKieyCx0WTxHbkf5E1rBlv/ybFk8WTT4hL5W2jlVxum2Zbe0jMUpuQdDrpa4z2vnPiJ5KIWCqL/kd16fKYg==",
"dev": true, "dev": true,
"requires": {} "requires": {}
}, },

View File

@@ -119,8 +119,8 @@
"pkg": "5.8.0", "pkg": "5.8.0",
"postcss": "^8.4.14", "postcss": "^8.4.14",
"postcss-loader": "^7.0.1", "postcss-loader": "^7.0.1",
"prettier": "^2.7.1", "prettier": "2.8.4",
"prettier-plugin-tailwindcss": "^0.1.13", "prettier-plugin-tailwindcss": "^0.2.5",
"process": "^0.11.10", "process": "^0.11.10",
"regedit": "^3.0.3", "regedit": "^3.0.3",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",