Skip to content

Commit eb9f2e0

Browse files
committed
lints
1 parent ceba2e5 commit eb9f2e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@ const isStars = (url: URL | HTMLAnchorElement | Location = location): boolean =>
820820
|| (subpath === 'lists' && patharr.length !== 3)
821821
|| (['repositories', 'topics'].includes(subpath) && patharr.length === 3));
822822
};
823+
823824
TEST: addTests('isStars', [
824825
'https://github.com/stars',
825826
'https://github.com/stars/lstn',
@@ -830,9 +831,9 @@ TEST: addTests('isStars', [
830831

831832
export const isOwnStars = (url: URL | HTMLAnchorElement | Location = location): boolean =>
832833
isStars(url)
833-
&& [['stars'],['stars', getLoggedInUser()]].some(
834-
(needle => arr => arr.length === needle.length
835-
&& arr.every((v, i) => v === needle[i]))(getCleanPathname(url).split('/').slice(0,2))
834+
&& [['stars'], ['stars', getLoggedInUser()]].some(
835+
(needle => pathArr => pathArr.length === needle.length
836+
&& pathArr.every((v, i) => v === needle[i]))(getCleanPathname(url).split('/').slice(0, 2))
836837
);
837838

838839
export const isStarsList = (url: URL | HTMLAnchorElement | Location = location): boolean => isStars(url) && getCleanPathname(url).split('/')[2] === 'lists';
@@ -842,7 +843,6 @@ TEST: addTests('isStarsList', [
842843

843844
export const isOwnStarsList = (url: URL | HTMLAnchorElement | Location = location): boolean => isOwnStars(url) && getCleanPathname(url).split('/')[2] === 'lists';
844845

845-
846846
export const isUserTheOrganizationOwner = (): boolean => isOrganizationProfile() && exists('[aria-label="Organization"] [data-tab-item="org-header-settings-tab"]');
847847

848848
export const canUserAdminRepo = (): boolean => isRepo() && exists('.reponav-item[href$="/settings"], [data-tab-item$="settings-tab"]');

0 commit comments

Comments
 (0)