diff --git a/.changeset/empty-terms-scream.md b/.changeset/empty-terms-scream.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/empty-terms-scream.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index a56ec49cc3..afef97f547 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -34,7 +34,7 @@ jobs: with: use-turbo-cache: 'true' - name: Run lint - run: npm run lint + run: npm run lint -- --output-logs=errors-only -- --quiet unit-tests: name: Run unit tests diff --git a/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersPage.tsx b/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersPage.tsx index f99b9cba5e..ed6c72a0f5 100644 --- a/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersPage.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersPage.tsx @@ -24,6 +24,7 @@ export const InviteMembersPage = withCardStateProvider(() => { const reachedOrganizationMemberLimit = !!__unstable_manageBillingMembersLimit && runIfFunctionOrReturn(__unstable_manageBillingMembersLimit) <= + // eslint-disable-next-line @typescript-eslint/restrict-plus-operands organization.pendingInvitationsCount + organization.membersCount; return ( diff --git a/packages/clerk-js/src/ui/components/OrganizationProfile/MembershipWidget.tsx b/packages/clerk-js/src/ui/components/OrganizationProfile/MembershipWidget.tsx index e5deb2966b..9224cd6c67 100644 --- a/packages/clerk-js/src/ui/components/OrganizationProfile/MembershipWidget.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationProfile/MembershipWidget.tsx @@ -14,6 +14,9 @@ export const MembershipWidget = () => { return null; } + // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + const totalCount = organization?.membersCount + organization?.pendingInvitationsCount; + return ( ({ @@ -57,7 +60,7 @@ export const MembershipWidget = () => { color: t.colors.$blackAlpha600, })} > - {organization?.membersCount + organization?.pendingInvitationsCount} of{' '} + {totalCount} of{' '} {__unstable_manageBillingMembersLimit ? `${runIfFunctionOrReturn(__unstable_manageBillingMembersLimit)} members` : 'unlimited'} diff --git a/packages/clerk-js/src/ui/components/OrganizationProfile/ProfileSettingsPage.tsx b/packages/clerk-js/src/ui/components/OrganizationProfile/ProfileSettingsPage.tsx index 8aaa0c4aa2..2002c34ff6 100644 --- a/packages/clerk-js/src/ui/components/OrganizationProfile/ProfileSettingsPage.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationProfile/ProfileSettingsPage.tsx @@ -37,6 +37,7 @@ export const ProfileSettingsPage = withCardStateProvider(() => { const dataChanged = organization.name !== nameField.value || organization.slug !== slugField.value; const canSubmit = (dataChanged || avatarChanged) && !slugField.errorText; + // eslint-disable-next-line @typescript-eslint/require-await const onSubmit = async (e: React.FormEvent) => { e.preventDefault(); return (dataChanged ? organization.update({ name: nameField.value, slug: slugField.value }) : Promise.resolve()) diff --git a/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcherTrigger.tsx b/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcherTrigger.tsx index 4d7e5f90f4..31b72059c3 100644 --- a/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcherTrigger.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationSwitcher/OrganizationSwitcherTrigger.tsx @@ -85,6 +85,7 @@ const NotificationCountBadgeSwitcherTrigger = withGate( }); const notificationCount = + // eslint-disable-next-line @typescript-eslint/restrict-plus-operands (userInvitations.count || 0) + (userSuggestions.count || 0) + (membershipRequests?.count || 0); return ( diff --git a/packages/clerk-js/src/ui/components/UserProfile/ConnectedAccountsPage.tsx b/packages/clerk-js/src/ui/components/UserProfile/ConnectedAccountsPage.tsx index 4bb84bd82f..985379eb29 100644 --- a/packages/clerk-js/src/ui/components/UserProfile/ConnectedAccountsPage.tsx +++ b/packages/clerk-js/src/ui/components/UserProfile/ConnectedAccountsPage.tsx @@ -51,7 +51,7 @@ const AddConnectedAccount = () => { const isModal = mode === 'modal'; const enabledStrategies = strategies.filter(s => s.startsWith('oauth')) as OAuthStrategy[]; - const connectedStrategies = user.verifiedExternalAccounts.map(a => 'oauth_' + a.provider) as OAuthStrategy[]; + const connectedStrategies = user.verifiedExternalAccounts.map(a => `oauth_${a.provider}`) as OAuthStrategy[]; const unconnectedStrategies = enabledStrategies.filter(provider => { return !connectedStrategies.includes(provider); diff --git a/packages/clerk-js/src/ui/components/UserProfile/EmailPage.tsx b/packages/clerk-js/src/ui/components/UserProfile/EmailPage.tsx index 2a43f931c4..a0fa4c2a04 100644 --- a/packages/clerk-js/src/ui/components/UserProfile/EmailPage.tsx +++ b/packages/clerk-js/src/ui/components/UserProfile/EmailPage.tsx @@ -37,6 +37,7 @@ export const EmailPage = withCardStateProvider(() => { const canSubmit = emailField.value.length > 1 && user.username !== emailField.value; + // eslint-disable-next-line @typescript-eslint/require-await const addEmail = async (e: React.FormEvent) => { e.preventDefault(); return user diff --git a/packages/clerk-js/src/ui/components/UserProfile/PhonePage.tsx b/packages/clerk-js/src/ui/components/UserProfile/PhonePage.tsx index be65f1a621..9beb8fbe4d 100644 --- a/packages/clerk-js/src/ui/components/UserProfile/PhonePage.tsx +++ b/packages/clerk-js/src/ui/components/UserProfile/PhonePage.tsx @@ -62,6 +62,7 @@ export const AddPhone = (props: AddPhoneProps) => { const canSubmit = phoneField.value.length > 1 && user.username !== phoneField.value; + // eslint-disable-next-line @typescript-eslint/require-await const addPhone = async (e: React.FormEvent) => { e.preventDefault(); return user diff --git a/packages/clerk-js/src/ui/components/UserProfile/ProfilePage.tsx b/packages/clerk-js/src/ui/components/UserProfile/ProfilePage.tsx index 744040bd84..7d5906d4b0 100644 --- a/packages/clerk-js/src/ui/components/UserProfile/ProfilePage.tsx +++ b/packages/clerk-js/src/ui/components/UserProfile/ProfilePage.tsx @@ -51,6 +51,7 @@ export const ProfilePage = withCardStateProvider(() => { const nameEditDisabled = user.samlAccounts.some(sa => sa.active); + // eslint-disable-next-line @typescript-eslint/require-await const onSubmit = async (e: React.FormEvent) => { e.preventDefault();