Skip to content

Commit

Permalink
Fix new lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
blazejkustra committed Jun 24, 2024
1 parent 1212d13 commit e5907c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ const ProcessMoneyRequestHoldStackNavigator = createModalStackNavigator({
});

const TransactionDuplicateStackNavigator = createModalStackNavigator<TransactionDuplicateNavigatorParamList>({
[SCREENS.TRANSACTION_DUPLICATE.REVIEW]: () => require('../../../../pages/TransactionDuplicate/Review').default as React.ComponentType,
[SCREENS.TRANSACTION_DUPLICATE.REVIEW]: () => require<ReactComponentModule>('../../../../pages/TransactionDuplicate/Review').default,
});

const SearchReportModalStackNavigator = createModalStackNavigator<SearchReportParamList>({
Expand Down
11 changes: 9 additions & 2 deletions tests/unit/CIGitLogicTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {execSync} from 'child_process';
import fs from 'fs';
import os from 'os';
import path from 'path';
import type {PackageJson} from 'type-fest';
import getPreviousVersion from '@github/actions/javascript/getPreviousVersion/getPreviousVersion';
import CONST from '@github/libs/CONST';
import GitUtils from '@github/libs/GitUtils';
Expand Down Expand Up @@ -49,8 +50,14 @@ function setupGitAsOSBotify() {
exec('git config --local user.email [email protected]');
}

function getVersion() {
return JSON.parse(fs.readFileSync('package.json', {encoding: 'utf-8'})).version as string;
function getVersion(): string {
const packageJson = JSON.parse(fs.readFileSync('package.json', {encoding: 'utf-8'})) as PackageJson;

if (!packageJson.version) {
throw new Error('package.json does not contain a version field');
}

return packageJson.version;
}

function initGitServer() {
Expand Down

0 comments on commit e5907c2

Please sign in to comment.