Skip to content

Commit

Permalink
fix scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp committed Jan 9, 2025
1 parent afd0b1f commit c11e722
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"env": {
"es6": true
},
"rules": {
"@typescript-eslint/consistent-type-imports": "error"
}
}
1 change: 1 addition & 0 deletions scripts/ci/codegen/__tests__/codegen.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { describe, expect, it, vi } from 'vitest';
import { pushGeneratedCode } from '../pushGeneratedCode.ts';

vi.mock('../../../common.ts', async (importOriginal) => {
// eslint-disable-next-line
const mod = await importOriginal<typeof import('../../../common.ts')>();
return {
...mod,
Expand Down
3 changes: 2 additions & 1 deletion scripts/ci/codegen/pushToRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
toAbsolutePath,
} from '../../common.ts';
import { getNbGitDiff } from '../utils.ts';
import { GuidesToPush, pushToRepositoryConfiguration, RepositoryConfiguration, SpecsToPush } from './types.ts';
import type { GuidesToPush, RepositoryConfiguration, SpecsToPush } from './types.ts';
import { pushToRepositoryConfiguration } from './types.ts';

import { getClientsConfigField } from '../../config.ts';
import { commitStartRelease } from './text.ts';
Expand Down
4 changes: 2 additions & 2 deletions scripts/cts/testServer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ export async function setupServer(name: string, port: number, addRoutes: (app: E
addRoutes(app);

// 404 handler
app.use((req, res) => {
app.use((req, _) => {
console.error(`[PORT ${port}] endpoint not implemented for`, req.method, req.url);
expect.fail('endpoint not implemented');
});

// catch all error handler
app.use((err, _req, res, _) => {
app.use((err, _req, _res, _) => {
console.error(err.message);
expect.fail(err.message);
});
Expand Down
4 changes: 4 additions & 0 deletions scripts/release/__tests__/createReleasePR.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const buildTestCommit = (

// Mock `getOctokit` to bypass the API call and credential requirements
vi.mock('../../common.ts', async (importOriginal) => {
// eslint-disable-next-line
const mod = await importOriginal<typeof import('../../common.ts')>();
return {
...mod,
Expand All @@ -48,6 +49,7 @@ vi.mock('../../common.ts', async (importOriginal) => {
});

vi.mock('../../ci/utils.ts', async (importOriginal) => {
// eslint-disable-next-line
const mod = await importOriginal<typeof import('../../ci/utils.ts')>();
return {
...mod,
Expand All @@ -56,6 +58,7 @@ vi.mock('../../ci/utils.ts', async (importOriginal) => {
});

vi.mock('../common.ts', async (importOriginal) => {
// eslint-disable-next-line
const mod = await importOriginal<typeof import('../common.ts')>();
const getFileChangesMockFn = vi.fn();

Expand All @@ -68,6 +71,7 @@ vi.mock('../common.ts', async (importOriginal) => {
});

vi.mock('../../config.ts', async (importOriginal) => {
// eslint-disable-next-line
const mod = await importOriginal<typeof import('../../config.ts')>();
return {
...mod,
Expand Down
2 changes: 1 addition & 1 deletion scripts/specs/__tests__/snippets.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest';

import { parseCodeSamples } from '../snippets.ts';
import { CodeSamples } from '../types.ts';
import type { CodeSamples } from '../types.ts';

describe('init', () => {
it('parses a multi line import', () => {
Expand Down

0 comments on commit c11e722

Please sign in to comment.