Skip to content

Commit 79aec4a

Browse files
committed
refactor: use type imports throughout codebase
1 parent 2db9a5c commit 79aec4a

File tree

285 files changed

+642
-567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

285 files changed

+642
-567
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
{
7070
"argsIgnorePattern": "^_"
7171
}
72-
]
72+
],
73+
"@typescript-eslint/no-import-type-side-effects": "warn"
7374
}
7475
},
7576
{

e2e/cli-e2e/tests/collect.e2e.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { dirname, join } from 'node:path';
22
import { fileURLToPath } from 'node:url';
33
import {
4-
AuditReport,
5-
PluginReport,
6-
Report,
4+
type AuditReport,
5+
type PluginReport,
6+
type Report,
77
reportSchema,
88
} from '@code-pushup/models';
99
import { cleanTestFolder } from '@code-pushup/test-setup';

e2e/cli-e2e/tests/compare.e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { simpleGit } from 'simple-git';
2-
import { ReportsDiff } from '@code-pushup/models';
2+
import type { ReportsDiff } from '@code-pushup/models';
33
import { cleanTestFolder } from '@code-pushup/test-setup';
44
import { executeProcess, readJsonFile, readTextFile } from '@code-pushup/utils';
55

e2e/nx-plugin-e2e/tests/create-nodes-plugin.e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tree } from '@nx/devkit';
1+
import type { Tree } from '@nx/devkit';
22
import { rm } from 'node:fs/promises';
33
import { join, relative } from 'node:path';
44
import { readProjectConfiguration } from 'nx/src/generators/utils/project-configuration';

e2e/nx-plugin-e2e/tests/executor-autorun.e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tree, updateProjectConfiguration } from '@nx/devkit';
1+
import { type Tree, updateProjectConfiguration } from '@nx/devkit';
22
import { rm } from 'node:fs/promises';
33
import { join, relative } from 'node:path';
44
import { readProjectConfiguration } from 'nx/src/generators/utils/project-configuration';

e2e/nx-plugin-e2e/tests/generator-configuration.e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tree } from '@nx/devkit';
1+
import type { Tree } from '@nx/devkit';
22
import { readFile, rm } from 'node:fs/promises';
33
import { join, relative } from 'node:path';
44
import { afterEach, expect } from 'vitest';

e2e/nx-plugin-e2e/tests/generator-init.e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tree } from '@nx/devkit';
1+
import type { Tree } from '@nx/devkit';
22
import { readFile, rm } from 'node:fs/promises';
33
import { join, relative } from 'node:path';
44
import { afterEach, expect } from 'vitest';

examples/plugins/mocks/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {
1+
import type {
22
PackageJson,
33
SourceResult,
44
} from '../src/package-json/src/integration/types';

examples/plugins/src/file-size/src/file-size.plugin.integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from '@code-pushup/models';
99
import { MEMFS_VOLUME } from '@code-pushup/test-utils';
1010
import {
11-
PluginOptions,
11+
type PluginOptions,
1212
audits,
1313
create,
1414
recommendedRefs,

examples/plugins/src/file-size/src/file-size.plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { stat } from 'node:fs/promises';
22
import { basename } from 'node:path';
3-
import {
3+
import type {
44
AuditOutput,
55
AuditOutputs,
66
CategoryRef,

0 commit comments

Comments
 (0)