Skip to content

Commit c11e722

Browse files
committed
fix scripts
1 parent afd0b1f commit c11e722

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

oxlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"env": {
33
"es6": true
4+
},
5+
"rules": {
6+
"@typescript-eslint/consistent-type-imports": "error"
47
}
58
}

scripts/ci/codegen/__tests__/codegen.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { describe, expect, it, vi } from 'vitest';
33
import { pushGeneratedCode } from '../pushGeneratedCode.ts';
44

55
vi.mock('../../../common.ts', async (importOriginal) => {
6+
// eslint-disable-next-line
67
const mod = await importOriginal<typeof import('../../../common.ts')>();
78
return {
89
...mod,

scripts/ci/codegen/pushToRepository.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import {
1515
toAbsolutePath,
1616
} from '../../common.ts';
1717
import { getNbGitDiff } from '../utils.ts';
18-
import { GuidesToPush, pushToRepositoryConfiguration, RepositoryConfiguration, SpecsToPush } from './types.ts';
18+
import type { GuidesToPush, RepositoryConfiguration, SpecsToPush } from './types.ts';
19+
import { pushToRepositoryConfiguration } from './types.ts';
1920

2021
import { getClientsConfigField } from '../../config.ts';
2122
import { commitStartRelease } from './text.ts';

scripts/cts/testServer/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ export async function setupServer(name: string, port: number, addRoutes: (app: E
6161
addRoutes(app);
6262

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

6969
// catch all error handler
70-
app.use((err, _req, res, _) => {
70+
app.use((err, _req, _res, _) => {
7171
console.error(err.message);
7272
expect.fail(err.message);
7373
});

scripts/release/__tests__/createReleasePR.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const buildTestCommit = (
3030

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

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

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

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

7073
vi.mock('../../config.ts', async (importOriginal) => {
74+
// eslint-disable-next-line
7175
const mod = await importOriginal<typeof import('../../config.ts')>();
7276
return {
7377
...mod,

scripts/specs/__tests__/snippets.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, it } from 'vitest';
22

33
import { parseCodeSamples } from '../snippets.ts';
4-
import { CodeSamples } from '../types.ts';
4+
import type { CodeSamples } from '../types.ts';
55

66
describe('init', () => {
77
it('parses a multi line import', () => {

0 commit comments

Comments
 (0)