Skip to content

Commit

Permalink
fix: typos in packages/features
Browse files Browse the repository at this point in the history
Found via `codespell -q 3 -S "*.svg,./apps/web/public/static/locales,./packages/app-store/stripepayment/lib/currencyOptions.ts,./packages/lib/freeEmailDomainCheck/freeEmailDomains.ts" -L afterall,atleast,datea,fo,incase,ist,nam,notin,optionel,perview,reccuring`

Closes calcom#19219
  • Loading branch information
luzpaz committed Feb 10, 2025
1 parent 7e20b74 commit 7a0ff7e
Show file tree
Hide file tree
Showing 48 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion packages/features/auth/lib/getServerSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function getServerSession(options: {
log.debug("Getting server session", safeStringify({ token }));

if (!token || !token.email || !token.sub) {
log.debug("Couldnt get token");
log.debug("Couldn't get token");
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/features/bookings/Booker/components/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const gridAreaClassNameMap: { [key in BookerAreas]: string } = {
};

/**
* Small helper compnent that renders a booker section in a specific grid area.
* Small helper component that renders a booker section in a specific grid area.
*/
export const BookerSection = forwardRef<HTMLDivElement, BookerSectionProps>(function BookerSection(
{ children, area, visible, className, ...props },
Expand Down
4 changes: 2 additions & 2 deletions packages/features/bookings/Booker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ export const getBookerSizeClassNames = (
"[--booker-timeslots-width:240px] lg:[--booker-timeslots-width:280px]",
// Small calendar defaults
layout === BookerLayouts.MONTH_VIEW && getBookerMetaClass("[--booker-meta-width:240px]"),
// Meta column get's wider in booking view to fit the full date on a single row in case
// of a multi occurance event. Also makes form less wide, which also looks better.
// Meta column gets wider in booking view to fit the full date on a single row in case
// of a multi occurence event. Also makes form less wide, which also looks better.
layout === BookerLayouts.MONTH_VIEW &&
bookerState === "booking" &&
`[--booker-main-width:420px] ${getBookerMetaClass("lg:[--booker-meta-width:340px]")}`,
Expand Down
2 changes: 1 addition & 1 deletion packages/features/bookings/Booker/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export type BookerStore = {
initialize: (data: StoreInitializeType) => void;
/**
* Stored form state, used when user navigates back and
* forth between timeslots and form. Get's cleared on submit
* forth between timeslots and form. Gets cleared on submit
* to prevent sticky data.
*/
formValues: Record<string, any>;
Expand Down
2 changes: 1 addition & 1 deletion packages/features/bookings/components/EventTypeFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const EventTypeFilter = () => {
(item) => item?.team?.name || ""
); // Add the team name
const individualEvents = data.filter((el) => !el.team);
// push indivdual events to the start of grouped array
// push individual events to the start of grouped array
return individualEvents.length > 0 ? { user_own_event_types: individualEvents, ...grouped } : grouped;
}, [eventTypes.data]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const mapBookingToMutationInput = ({

// This method is here to ensure that the types are correct (recurring count is required),
// as well as generate a unique ID for the recurring bookings and turn one single booking
// into an array of mutiple bookings based on the recurring count.
// into an array of multiple bookings based on the recurring count.
// Other than that it forwards the mapping to mapBookingToMutationInput.
export const mapRecurringBookingToMutationInput = (
booking: BookingOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/features/bookings/lib/getBookingFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export const ensureBookingInputsHaveSystemFields = ({

// Backward Compatibility for SMS Reminder Number
// Note: We still need workflows in `getBookingFields` due to Backward Compatibility. If we do a one time entry for all event-types, we can remove workflows from `getBookingFields`
// Also, note that even if Workflows don't explicity add smsReminderNumber field to bookingFields, it would be added as a side effect of this backward compatibility logic
// Also, note that even if Workflows don't explicitly add smsReminderNumber field to bookingFields, it would be added as a side effect of this backward compatibility logic
if (
smsNumberSources.length &&
!bookingFields.find((f) => getFieldIdentifier(f.name) !== getFieldIdentifier(SMS_REMINDER_NUMBER_FIELD))
Expand Down
12 changes: 6 additions & 6 deletions packages/features/bookings/lib/getBookingResponsesSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ describe("getBookingResponsesSchema", () => {
});

describe("multiemail field type", () => {
test("should succesfully parse a multiemail type field", async () => {
test("should successfully parse a multiemail type field", async () => {
const schema = getBookingResponsesSchema({
bookingFields: [
{
Expand Down Expand Up @@ -794,7 +794,7 @@ describe("getBookingResponsesSchema", () => {
);
});

test("should succesfully parse a multiemail type field response, even when the value is just a string[Prefill needs it]", async () => {
test("should successfully parse a multiemail type field response, even when the value is just a string[Prefill needs it]", async () => {
const schema = getBookingResponsesSchema({
bookingFields: [
{
Expand Down Expand Up @@ -833,7 +833,7 @@ describe("getBookingResponsesSchema", () => {
});

describe("multiselect field type", () => {
test("should succesfully parse a multiselect type field", async () => {
test("should successfully parse a multiselect type field", async () => {
const schema = getBookingResponsesSchema({
bookingFields: [
{
Expand Down Expand Up @@ -870,7 +870,7 @@ describe("getBookingResponsesSchema", () => {
testMultiselect: ["option1", "option-2"],
});
});
test("should succesfully parse a multiselect type field", async () => {
test("should successfully parse a multiselect type field", async () => {
const schema = getBookingResponsesSchema({
bookingFields: [
{
Expand Down Expand Up @@ -950,7 +950,7 @@ describe("getBookingResponsesSchema", () => {
});

describe("multiselect field type", () => {
test("should succesfully parse a multiselect type field", async () => {
test("should successfully parse a multiselect type field", async () => {
const schema = getBookingResponsesSchema({
bookingFields: [
{
Expand Down Expand Up @@ -1321,7 +1321,7 @@ describe("excluded email/domain validation", () => {
});

describe("require email/domain validation", () => {
test("should fail if the requried email/domain is not present", async () => {
test("should fail if the required email/domain is not present", async () => {
const requiredEmails = "gmail.com, [email protected], @yahoo.com";
const schema = getBookingResponsesSchema({
bookingFields: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function getLocationsOptionsForSelect(
const translatedLocation = getTranslatedLocation(location, eventLocation, t);

return {
// XYZ: is considered a namespace in i18next https://www.i18next.com/principles/namespaces and thus it get's cleaned up.
// XYZ: is considered a namespace in i18next https://www.i18next.com/principles/namespaces and thus it gets cleaned up.
label: translatedLocation || locationString,
value: type,
inputPlaceholder: t(eventLocation?.attendeeInputPlaceholder || ""),
Expand Down
4 changes: 2 additions & 2 deletions packages/features/bookings/lib/handleNewBooking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ async function handler(
);
// no more freeUsers after subtracting notAvailableLuckyUsers from luckyUsers :(
if (freeUsers.length === 0) break;
assertNonEmptyArray(freeUsers); // make sure TypeScript knows it too wih an assertion; the error will never be thrown.
assertNonEmptyArray(freeUsers); // make sure TypeScript knows it too with an assertion; the error will never be thrown.
// freeUsers is ensured
const originalRescheduledBookingUserId =
originalRescheduledBooking && originalRescheduledBooking.userId;
Expand Down Expand Up @@ -949,7 +949,7 @@ async function handler(
organizerEmail = eventType.secondaryEmail.email;
}

//udpate cal event responses with latest location value , later used by webhook
//update cal event responses with latest location value , later used by webhook
if (reqBody.calEventResponses)
reqBody.calEventResponses["location"].value = {
value: platformBookingLocation ?? bookingLocation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe("handleNewBooking", () => {
timeout
);

describe("Availablity Check During Booking", () => {
describe("Availability Check During Booking", () => {
test(
`should fail a booking if there is already a conflicting booking in the first user's selectedCalendars`,
async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe("handleNewBooking", () => {
describe("Collective Assignment", () => {
describe("When there is no schedule set on eventType - Hosts schedules would be used", () => {
test(
`succesfully creates a booking when all the hosts are free as per their schedules
`successfully creates a booking when all the hosts are free as per their schedules
- Destination calendars for event-type and non-first hosts are used to create calendar events
`,
async ({ emails }) => {
Expand Down Expand Up @@ -375,7 +375,7 @@ describe("handleNewBooking", () => {

describe("When there is a schedule set on eventType - Event Type common schedule would be used", () => {
test(
`succesfully creates a booking when the users are available as per the common schedule selected in the event-type
`successfully creates a booking when the users are available as per the common schedule selected in the event-type
- Destination calendars for event-type and non-first hosts are used to create calendar events
`,
async ({ emails }) => {
Expand Down Expand Up @@ -551,7 +551,7 @@ describe("handleNewBooking", () => {
timeout
);
test(
`[Event Type with both Attendee Phone number and Email as required fields] succesfully creates a booking when the users are available as per the common schedule selected in the event-type
`[Event Type with both Attendee Phone number and Email as required fields] successfully creates a booking when the users are available as per the common schedule selected in the event-type
- Destination calendars for event-type and non-first hosts are used to create calendar events
`,
async ({ emails, sms }) => {
Expand Down Expand Up @@ -788,7 +788,7 @@ describe("handleNewBooking", () => {
);

test(
`[Event Type with only Attendee Phone number as required field and Email as hidden field] succesfully creates a booking when the users are available as per the common schedule selected in the event-type
`[Event Type with only Attendee Phone number as required field and Email as hidden field] successfully creates a booking when the users are available as per the common schedule selected in the event-type
- Destination calendars for event-type and non-first hosts are used to create calendar events
`,
async ({ emails, sms }) => {
Expand Down Expand Up @@ -1029,7 +1029,7 @@ describe("handleNewBooking", () => {
timeout
);
test(
`[Event Type that requires confirmation with only Attendee Phone number as required field and Email as optional field] succesfully creates a booking when the users are available as per the common schedule selected in the event-type
`[Event Type that requires confirmation with only Attendee Phone number as required field and Email as optional field] successfully creates a booking when the users are available as per the common schedule selected in the event-type
- Destination calendars for event-type and non-first hosts are used to create calendar events
`,
async ({ emails, sms }) => {
Expand Down Expand Up @@ -1931,7 +1931,7 @@ describe("handleNewBooking", () => {

describe("Team(T1) not part of any org but the organizer is part of an organization(O1)", () => {
test(
`succesfully creates a booking when all the hosts are free as per their schedules
`successfully creates a booking when all the hosts are free as per their schedules
- Destination calendars for event-type and non-first hosts are used to create calendar events
- Reschedule and Cancel link in email are not of the org domain because the team is not part of any org
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2438,7 +2438,7 @@ describe("handleSeats", () => {
const firstBookingEndTime = `${plus1DateString}T04:30:00Z`;

const { dateString: plus2DateString } = getDate({ dateIncrement: 2 });
// Non-available time slot choosen (7:30PM - 8:00PM IST) while rescheduling
// Non-available time slot chosen (7:30PM - 8:00PM IST) while rescheduling
const secondBookingStartTime = `${plus2DateString}T14:00:00Z`;
const secondBookingEndTime = `${plus2DateString}T14:30:00Z`;

Expand Down
2 changes: 1 addition & 1 deletion packages/features/bookings/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export enum EventDetailBlocks {
DURATION,
LOCATION,
REQUIRES_CONFIRMATION,
// Includes input to select # of occurences.
// Includes input to select # of occurrences.
OCCURENCES,
PRICE,
}
Expand Down
2 changes: 1 addition & 1 deletion packages/features/calendar-cache/api/cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const handleCalendarsToWatch = async () => {
return result;
};

// This cron is used to activate and renew calendar subcriptions
// This cron is used to activate and renew calendar subscriptions
const handler = defaultResponder(async (request: NextApiRequest) => {
validateRequest(request);
await Promise.allSettled([handleCalendarsToWatch(), handleCalendarsToUnwatch()]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Calendar } from "./Calendar";

## Props

The Args Table below shows you a breakdown of what props can be passed into the Calendar component. All props should have a desciption to make it self explanitory to see what is going on.
The Args Table below shows you a breakdown of what props can be passed into the Calendar component. All props should have a description to make it self explanatory to see what is going on.

<CustomArgsTable of="calendar" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function CurrentTime() {
if (!currentTimeRef.current || scrolledIntoView) return;
// Within a small timeout so element has time to render.
setTimeout(() => {
// eslint-disable-next-line @calcom/eslint/no-scroll-into-view-embed -- Does't seem to cause any issue. Put it under condition if needed
// eslint-disable-next-line @calcom/eslint/no-scroll-into-view-embed -- Doesn't seem to cause any issue. Put it under condition if needed
currentTimeRef?.current?.scrollIntoView({ block: "center" });
setScrolledIntoView(true);
}, 100);
Expand Down
2 changes: 1 addition & 1 deletion packages/features/calendars/weeklyview/types/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export type CalendarState = {
loading?: boolean;
/** Disables all actions on Events*/
eventsDisabled?: boolean;
/** If you don't want the date to be scrollable past a certian date */
/** If you don't want the date to be scrollable past a certain date */
minDate?: Date;
/** If you don't want the date to be scrollable past a certain date */
maxDate?: Date;
Expand Down
2 changes: 1 addition & 1 deletion packages/features/cityTimezones/cityTimezonesHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const cityTimezonesHandler = async () => {
}
});
const uniqueCities = Object.values(topPopulatedCities);
/** Add specific overries in here */
/** Add specific overrides in here */
uniqueCities.forEach((city) => {
if (city.city === "London") city.timezone = "Europe/London";
if (city.city === "Londonderry") city.city = "London";
Expand Down
2 changes: 1 addition & 1 deletion packages/features/ee/billing/api/webhook/__handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ export const stripeWebhookHandler = (handlers: SWHandlers) => async (req: NextAp
const handler = (await handlerGetter())?.default;
// auto catch unsupported Stripe events.
if (!handler) throw new HttpCode(202, `Unhandled Stripe Webhook event type ${event.type}`);
// @ts-expect-error - we know the handler is defined and accpets the data type
// @ts-expect-error - we know the handler is defined and accepts the data type
return await handler(event.data);
};
2 changes: 1 addition & 1 deletion packages/features/ee/billing/teams/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class TeamBilling {
if (IS_TEAM_BILLING_ENABLED) return new InternalTeamBilling(team);
return new StubTeamBilling(team);
}
/** Initialize multuple team billings at once for bulk operations */
/** Initialize multiple team billings at once for bulk operations */
static initMany(teams: TeamBillingInput[]) {
return teams.map((team) => TeamBilling.init(team));
}
Expand Down
2 changes: 1 addition & 1 deletion packages/features/ee/cal-ai-phone/promptTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const DEFAULT_PROMPT_VALUE = `## You are helping user set up a call with
## Task Steps
1. I am here to learn more about your issue and help schedule an appointment with our support team.
2. If {{email}} is not unknown then Use name {{name}} and email {{email}} for creating booking else Ask for user name and email and Confirm the name and email with user by reading it back to user.
3. Ask user for \"When would you want to meet with one of our representive\".
3. Ask user for \"When would you want to meet with one of our representatives\".
4. Call function check_availability to check for availability in the user provided time range.
- if availability exists, inform user about the availability range (do not repeat the detailed available slot) and ask user to choose from it. Make sure user chose a slot within detailed available slot.
- if availability does not exist, ask user to select another time range for the appointment, repeat this step 3.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ async function isReturningToSelf({ session, creds }: { session: Session | null;
if (returningUser) {
// Skip for none org users
const inOrg =
returningUser.organizationId || // Keep for backwards compatability
returningUser.organizationId || // Keep for backwards compatibility
returningUser.profiles.some((profile) => profile.organizationId !== undefined); // New way of seeing if the user has a profile in orgs.
if (returningUser.role !== "ADMIN" && !inOrg) return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const CreateANewOrganizationFormChild = ({
</>
)}

{/* This radio group does nothing - its just for visuall purposes */}
{/* This radio group does nothing - its just for visual purposes */}
{!isAdmin && (
<>
<div className="bg-subtle space-y-5 rounded-lg p-5">
Expand Down
2 changes: 1 addition & 1 deletion packages/features/ee/organizations/context/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { teamMetadataSchema } from "@calcom/prisma/zod-utils";
/**
* Organization branding
*
* Entries consist of the different properties that constitues a brand for an organization.
* Entries consist of the different properties that constitute a brand for an organization.
*/
export type OrganizationBranding =
| ({
Expand Down
2 changes: 1 addition & 1 deletion packages/features/ee/round-robin/utils/getTeamMembers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Attendee = {
noShow: boolean | null;
};

// TODO: We have far too many differnt types here. Theyre all users or hosts at the end of the day.
// TODO: We have far too many different types here. They're all users or hosts at the end of the day.
type OrganizerType =
| getEventTypeResponse["hosts"][number]["user"]
| IsFixedAwareUser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)

<Form form={newMemberFormMethods} handleSubmit={(values) => props.onSubmit(values, resetFields)}>
<div className="mb-10 mt-6 space-y-6">
{/* Indivdual Invite */}
{/* Individual Invite */}
{modalImportMode === "INDIVIDUAL" && (
<Controller
name="emailOrUsername"
Expand Down
6 changes: 3 additions & 3 deletions packages/features/ee/users/components/UsersTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ function UsersTableBare() {
const mutation = trpc.viewer.users.delete.useMutation({
onSuccess: async () => {
showToast("User has been deleted", "success");
// Lets not invalidated the whole cache, just remove the user from the cache.
// usefull cause in prod this will be fetching 100k+ users
// FIXME: Tested locally and it doesnt't work, need to investigate
// Lets not invalidate the whole cache, just remove the user from the cache.
// Useful cause in prod this will be fetching 100k+ users
// FIXME: Tested locally and it doesn't work, need to investigate
utils.viewer.admin.listPaginated.setInfiniteData({ limit: FETCH_LIMIT }, (cachedData) => {
if (!cachedData) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const smsReminderTemplate = (
name ? ` ${name}` : ``
}, this is a reminder that your meeting (${eventName}) with ${attendee} is on ${eventDate} at ${startTime} ${timeZone}.`;

//Twilio recomments message to be no longer than 320 characters
//Twilio recommends message to be no longer than 320 characters
if (templateOne.length <= 320) return templateOne;

const templateTwo = `Hi, this is a reminder that your meeting with ${attendee} is on ${eventDate} at ${startTime} ${timeZone}`;
Expand Down
Loading

0 comments on commit 7a0ff7e

Please sign in to comment.