Prettier 2: Electric Boogaloo (#6113)

# Description of Changes
When I added Prettier formatting in #6052, my aim was to use just the
default settings in Prettier. Turns out, Prettier looks _really hard_
for any config files if it's not explicitly given one, which means that
if a developer has some sort of Prettier config file lying around on
their system, Prettier might find it and use it. Also, Prettier changes
its defaults based on stuff in `.editorconfig` without any good way of
disabling that behaviour explicitly in its config file.

To solve both of these issues, I've introduced a `.prettierrc` file
which sets Prettier's defaults explicitly, and then reformatted all our
code _again_ in Prettier's actual default settings. This should achieve
the aim of #6052 and remove the possibility for it breaking on different
dev computers.
This commit is contained in:
James Brunton
2026-04-17 09:50:16 +00:00
committed by GitHub
parent de8c483054
commit 8ab060a4be
1207 changed files with 52646 additions and 15352 deletions
@@ -11,24 +11,35 @@ interface FreeTrialSlideProps {
function FreeTrialSlideTitle() {
const { t } = useTranslation();
return <span>{t("onboarding.freeTrial.title", "Your 30-Day Pro Trial")}</span>;
return (
<span>{t("onboarding.freeTrial.title", "Your 30-Day Pro Trial")}</span>
);
}
const FreeTrialSlideBody = ({ trialStatus }: { trialStatus: TrialStatus }) => {
const { t } = useTranslation();
// Format the trial end date
const trialEndDate = new Date(trialStatus.trialEnd).toLocaleDateString(undefined, {
year: "numeric",
month: "long",
day: "numeric",
});
const trialEndDate = new Date(trialStatus.trialEnd).toLocaleDateString(
undefined,
{
year: "numeric",
month: "long",
day: "numeric",
},
);
// Determine which message to show based on payment method
const afterTrialMessage = trialStatus.hasScheduledSub
? t("onboarding.freeTrial.afterTrialWithPayment", "Your Pro subscription will start automatically when the trial ends.")
? t(
"onboarding.freeTrial.afterTrialWithPayment",
"Your Pro subscription will start automatically when the trial ends.",
)
: trialStatus.hasPaymentMethod
? t("onboarding.freeTrial.afterTrialWithPayment", "Your Pro subscription will start automatically when the trial ends.")
? t(
"onboarding.freeTrial.afterTrialWithPayment",
"Your Pro subscription will start automatically when the trial ends.",
)
: t(
"onboarding.freeTrial.afterTrialWithoutPayment",
"After your trial ends, you'll continue with our free tier. Add a payment method to keep Pro access.",
@@ -37,8 +48,14 @@ const FreeTrialSlideBody = ({ trialStatus }: { trialStatus: TrialStatus }) => {
// Pluralize days remaining
const daysText =
trialStatus.daysRemaining === 1
? t("onboarding.freeTrial.daysRemainingSingular", "{{days}} day remaining", { days: trialStatus.daysRemaining })
: t("onboarding.freeTrial.daysRemaining", "{{days}} days remaining", { days: trialStatus.daysRemaining });
? t(
"onboarding.freeTrial.daysRemainingSingular",
"{{days}} day remaining",
{ days: trialStatus.daysRemaining },
)
: t("onboarding.freeTrial.daysRemaining", "{{days}} days remaining", {
days: trialStatus.daysRemaining,
});
return (
<div style={{ display: "flex", flexDirection: "column", gap: "1rem" }}>
@@ -56,9 +73,19 @@ const FreeTrialSlideBody = ({ trialStatus }: { trialStatus: TrialStatus }) => {
textAlign: "center",
}}
>
<div style={{ fontSize: "1.25rem", fontWeight: "bold", marginBottom: "0.5rem" }}>{daysText}</div>
<div
style={{
fontSize: "1.25rem",
fontWeight: "bold",
marginBottom: "0.5rem",
}}
>
{daysText}
</div>
<div style={{ fontSize: "0.9rem", opacity: 0.9 }}>
{t("onboarding.freeTrial.trialEnds", "Trial ends {{date}}", { date: trialEndDate })}
{t("onboarding.freeTrial.trialEnds", "Trial ends {{date}}", {
date: trialEndDate,
})}
</div>
</div>
<p style={{ fontSize: "0.9rem", opacity: 0.9 }}>{afterTrialMessage}</p>
@@ -66,7 +93,9 @@ const FreeTrialSlideBody = ({ trialStatus }: { trialStatus: TrialStatus }) => {
);
};
export default function FreeTrialSlide({ trialStatus }: FreeTrialSlideProps): SlideConfig {
export default function FreeTrialSlide({
trialStatus,
}: FreeTrialSlideProps): SlideConfig {
return {
key: "free-trial",
title: <FreeTrialSlideTitle />,