diff --git a/biome.json b/biome.json
index efb5eb388..8b73637ee 100644
--- a/biome.json
+++ b/biome.json
@@ -8,7 +8,8 @@
"rules": {
"recommended": true,
"nursery": {
- "noUnusedFunctionParameters": "error"
+ "noUnusedFunctionParameters": "error",
+ "useDefaultSwitchClause": "error"
},
"correctness": {
"useExhaustiveDependencies": {
diff --git a/src/components/AccountNotifications.tsx b/src/components/AccountNotifications.tsx
index 0bda63707..6bb4cbb39 100644
--- a/src/components/AccountNotifications.tsx
+++ b/src/components/AccountNotifications.tsx
@@ -54,7 +54,6 @@ export const AccountNotifications = (props: IProps) => {
return (
diff --git a/src/components/Repository.tsx b/src/components/Repository.tsx
index 3a42f6a3a..500302519 100644
--- a/src/components/Repository.tsx
+++ b/src/components/Repository.tsx
@@ -2,13 +2,11 @@ import { CheckIcon, MarkGithubIcon, ReadIcon } from '@primer/octicons-react';
import { type FC, useCallback, useContext } from 'react';
import { CSSTransition, TransitionGroup } from 'react-transition-group';
import { AppContext } from '../context/App';
-import type { Account } from '../types';
import type { Notification } from '../typesGitHub';
import { openRepository } from '../utils/links';
import { NotificationRow } from './NotificationRow';
interface IProps {
- account: Account;
repoNotifications: Notification[];
repoName: string;
}
@@ -16,7 +14,6 @@ interface IProps {
export const RepositoryNotifications: FC = ({
repoName,
repoNotifications,
- account,
}) => {
const { markRepoNotificationsRead, markRepoNotificationsDone } =
useContext(AppContext);
diff --git a/src/utils/auth/utils.test.ts b/src/utils/auth/utils.test.ts
index f120fd49a..5648a4599 100644
--- a/src/utils/auth/utils.test.ts
+++ b/src/utils/auth/utils.test.ts
@@ -3,6 +3,7 @@ import type { AxiosPromise, AxiosResponse } from 'axios';
import { mockAuth, mockGitHubCloudAccount } from '../../__mocks__/state-mocks';
import type { Account, AuthState } from '../../types';
import * as apiRequests from '../api/request';
+import type { AuthMethod } from './types';
import * as auth from './utils';
import { getNewOAuthAppURL, getNewTokenURL } from './utils';
@@ -222,18 +223,27 @@ describe('utils/auth/utils.ts', () => {
method: 'GitHub App',
} as Account),
).toBe('https://github.com/settings/apps');
+
expect(
auth.getDeveloperSettingsURL({
hostname: 'github.com',
method: 'OAuth App',
} as Account),
).toBe('https://github.com/settings/developers');
+
expect(
auth.getDeveloperSettingsURL({
hostname: 'github.com',
method: 'Personal Access Token',
} as Account),
).toBe('https://github.com/settings/tokens');
+
+ expect(
+ auth.getDeveloperSettingsURL({
+ hostname: 'github.com',
+ method: 'unknown' as AuthMethod,
+ } as Account),
+ ).toBe('https://github.com/settings');
});
describe('getNewTokenURL', () => {
diff --git a/src/utils/auth/utils.ts b/src/utils/auth/utils.ts
index d7ded9554..151b29c5f 100644
--- a/src/utils/auth/utils.ts
+++ b/src/utils/auth/utils.ts
@@ -151,6 +151,9 @@ export function getDeveloperSettingsURL(account: Account): string {
case 'Personal Access Token':
settingsURL.pathname = '/settings/tokens';
break;
+ default:
+ settingsURL.pathname = '/settings';
+ break;
}
return settingsURL.toString();
}