From b3211b7a79c91843abe005de97e285e4c6b60886 Mon Sep 17 00:00:00 2001 From: eggyhead <28715808+eggyhead@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:51:04 +0000 Subject: [PATCH] lint fixes --- __tests__/cacheUtils.test.ts | 6 +++--- src/internal/cacheUtils.ts | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/__tests__/cacheUtils.test.ts b/__tests__/cacheUtils.test.ts index 9a4166c..4388026 100644 --- a/__tests__/cacheUtils.test.ts +++ b/__tests__/cacheUtils.test.ts @@ -3,8 +3,8 @@ import * as path from 'path' import * as cacheUtils from '../src/internal/cacheUtils' beforeEach(() => { - jest.resetModules() -}); + jest.resetModules() +}) test('getArchiveFileSizeInBytes returns file size', () => { const filePath = path.join(__dirname, '__fixtures__', 'helloWorld.txt') @@ -61,4 +61,4 @@ test('isGhes returns true for enterprise URL', async () => { test('isGhes returns false for ghe.localhost', () => { process.env.GITHUB_SERVER_URL = 'https://my.domain.ghe.localhost' expect(cacheUtils.isGhes()).toBe(false) -}) \ No newline at end of file +}) diff --git a/src/internal/cacheUtils.ts b/src/internal/cacheUtils.ts index 8bc3ce2..91bae9a 100644 --- a/src/internal/cacheUtils.ts +++ b/src/internal/cacheUtils.ts @@ -137,8 +137,9 @@ export function isGhes(): boolean { ) const hostname = ghUrl.hostname.trimEnd().toUpperCase() - const isGitHubHost = (hostname == 'GITHUB.COM') - const isGheHost = (hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST')) + const isGitHubHost = hostname === 'GITHUB.COM' + const isGheHost = + hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST') return !isGitHubHost && !isGheHost }