diff --git a/src/api/git/commitAllChanges.ts b/src/api/git/commitAllChanges.ts index c4b392aa1..85ac5fa12 100644 --- a/src/api/git/commitAllChanges.ts +++ b/src/api/git/commitAllChanges.ts @@ -1,10 +1,8 @@ import fs from 'fs-extra'; import git from 'isomorphic-git'; -import { commit } from './commit'; -import type { Identity } from './commit'; -import type { ChangedFile } from './getChangedFiles'; -import { getChangedFiles } from './getChangedFiles'; +import { type Identity, commit } from './commit'; +import { type ChangedFile, getChangedFiles } from './getChangedFiles'; interface CommitAllParameters { dir: string; diff --git a/src/api/github/checkRun.test.ts b/src/api/github/checkRun.test.ts index 906be561c..cbc9d2dac 100644 --- a/src/api/github/checkRun.test.ts +++ b/src/api/github/checkRun.test.ts @@ -1,7 +1,6 @@ import { Octokit } from '@octokit/rest'; import type { Endpoints } from '@octokit/types'; -import type { ReadCommitResult } from 'isomorphic-git'; -import git from 'isomorphic-git'; +import git, type { ReadCommitResult } from 'isomorphic-git'; import type * as GitHub from '../github'; diff --git a/src/api/github/push.test.ts b/src/api/github/push.test.ts index 89b697ddb..f47d70b2e 100644 --- a/src/api/github/push.test.ts +++ b/src/api/github/push.test.ts @@ -1,8 +1,7 @@ import { graphql } from '@octokit/graphql'; import type { FileChanges } from '@octokit/graphql-schema'; import fs from 'fs-extra'; -import type { ReadCommitResult } from 'isomorphic-git'; -import git from 'isomorphic-git'; +import git, type { ReadCommitResult } from 'isomorphic-git'; import { apiTokenFromEnvironment } from './environment'; import { diff --git a/src/api/net/waitFor.ts b/src/api/net/waitFor.ts index b2bba1edc..6f4945dec 100644 --- a/src/api/net/waitFor.ts +++ b/src/api/net/waitFor.ts @@ -1,6 +1,5 @@ import { resolveComposeAddress } from './compose'; -import type { SocketAddress } from './socket'; -import { pollSocket } from './socket'; +import { type SocketAddress, pollSocket } from './socket'; /** * Wait for a resource to start listening on a socket address. diff --git a/src/cli/adapter/eslint.ts b/src/cli/adapter/eslint.ts index 11d0a93fa..73ac50835 100644 --- a/src/cli/adapter/eslint.ts +++ b/src/cli/adapter/eslint.ts @@ -1,11 +1,9 @@ import path from 'path'; import chalk from 'chalk'; -import type { Linter } from 'eslint'; -import { ESLint } from 'eslint'; +import { ESLint, type Linter } from 'eslint'; -import type { Logger } from '../../utils/logging'; -import { pluralise } from '../../utils/logging'; +import { type Logger, pluralise } from '../../utils/logging'; const symbolForResult = (result: ESLint.LintResult) => { if (result.errorCount) { diff --git a/src/cli/adapter/prettier.ts b/src/cli/adapter/prettier.ts index 22efa2def..57f120e63 100644 --- a/src/cli/adapter/prettier.ts +++ b/src/cli/adapter/prettier.ts @@ -1,12 +1,17 @@ import path from 'path'; import fs from 'fs-extra'; -import type { Options, SupportLanguage } from 'prettier'; -import { check, format, getSupportInfo, resolveConfig } from 'prettier'; +import { + type Options, + type SupportLanguage, + check, + format, + getSupportInfo, + resolveConfig, +} from 'prettier'; import { crawlDirectory } from '../../utils/dir'; -import type { Logger } from '../../utils/logging'; -import { pluralise } from '../../utils/logging'; +import { type Logger, pluralise } from '../../utils/logging'; import { getConsumerManifest } from '../../utils/manifest'; import { formatPackage, parsePackage } from '../configure/processing/package'; diff --git a/src/cli/build/assets.ts b/src/cli/build/assets.ts index 324cbdc78..cd3a63c06 100644 --- a/src/cli/build/assets.ts +++ b/src/cli/build/assets.ts @@ -1,7 +1,6 @@ import path from 'path'; -import type { Color } from 'chalk'; -import chalk from 'chalk'; +import chalk, type { Color } from 'chalk'; import fs from 'fs-extra'; import { copyFile } from '../../utils/copy'; diff --git a/src/cli/configure/analyseDependencies.ts b/src/cli/configure/analyseDependencies.ts index 97d49b37c..c9e0527fc 100644 --- a/src/cli/configure/analyseDependencies.ts +++ b/src/cli/configure/analyseDependencies.ts @@ -3,8 +3,7 @@ import path from 'path'; import fs from 'fs-extra'; import type { NormalizedReadResult } from 'read-pkg-up'; -import type { TextProcessor } from '../../utils/copy'; -import { copyFiles } from '../../utils/copy'; +import { type TextProcessor, copyFiles } from '../../utils/copy'; import { log } from '../../utils/logging'; import type { ProjectType } from '../../utils/manifest'; import { getSkubaVersion, latestNpmVersion } from '../../utils/version'; diff --git a/src/cli/configure/ensureTemplateCompletion.ts b/src/cli/configure/ensureTemplateCompletion.ts index ebdf29716..f6f90d3d1 100644 --- a/src/cli/configure/ensureTemplateCompletion.ts +++ b/src/cli/configure/ensureTemplateCompletion.ts @@ -6,8 +6,10 @@ import type { NormalizedReadResult } from 'read-pkg-up'; import { copyFiles, createEjsRenderer } from '../../utils/copy'; import { log } from '../../utils/logging'; -import type { TemplateConfig } from '../../utils/template'; -import { ensureTemplateConfigDeletion } from '../../utils/template'; +import { + type TemplateConfig, + ensureTemplateConfigDeletion, +} from '../../utils/template'; import { hasStringProp } from '../../utils/validation'; import { getTemplateConfig, runForm } from '../init/getConfig'; diff --git a/src/cli/init/getConfig.ts b/src/cli/init/getConfig.ts index 35e221916..ecdb55807 100644 --- a/src/cli/init/getConfig.ts +++ b/src/cli/init/getConfig.ts @@ -14,18 +14,16 @@ import { } from '../../utils/template'; import { downloadGitHubTemplate } from './git'; -import type { BaseFields } from './prompts'; import { BASE_PROMPT_PROPS, + type BaseFields, GIT_PATH_PROMPT, SHOULD_CONTINUE_PROMPT, TEMPLATE_PROMPT, } from './prompts'; -import type { InitConfig } from './types'; -import { InitConfigInput } from './types'; +import { type InitConfig, InitConfigInput } from './types'; -import { Form } from 'enquirer'; -import type { FormChoice } from 'enquirer'; +import { Form, type FormChoice } from 'enquirer'; export const runForm = >(props: { choices: Readonly; diff --git a/src/cli/init/prompts.ts b/src/cli/init/prompts.ts index 3dc90f46a..7372d099a 100644 --- a/src/cli/init/prompts.ts +++ b/src/cli/init/prompts.ts @@ -2,9 +2,9 @@ import { pathExists } from 'fs-extra'; import { TEMPLATE_NAMES_WITH_BYO } from '../../utils/template'; -import type { Platform } from './validation'; import { PLATFORM_OPTIONS, + type Platform, isGitHubOrg, isGitHubRepo, isGitHubTeam, diff --git a/src/cli/lint/eslint.ts b/src/cli/lint/eslint.ts index 27dbb3746..e644a9901 100644 --- a/src/cli/lint/eslint.ts +++ b/src/cli/lint/eslint.ts @@ -5,8 +5,7 @@ import chalk from 'chalk'; import { createLogger } from '../../utils/logging'; import { execWorkerThread, postWorkerOutput } from '../../utils/worker'; -import type { ESLintOutput } from '../adapter/eslint'; -import { runESLint } from '../adapter/eslint'; +import { type ESLintOutput, runESLint } from '../adapter/eslint'; import type { Input } from './types'; diff --git a/src/cli/lint/prettier.ts b/src/cli/lint/prettier.ts index 4e42d0e4d..2299e6def 100644 --- a/src/cli/lint/prettier.ts +++ b/src/cli/lint/prettier.ts @@ -5,8 +5,7 @@ import chalk from 'chalk'; import { createLogger } from '../../utils/logging'; import { execWorkerThread, postWorkerOutput } from '../../utils/worker'; -import type { PrettierOutput } from '../adapter/prettier'; -import { runPrettier } from '../adapter/prettier'; +import { type PrettierOutput, runPrettier } from '../adapter/prettier'; import type { Input } from './types'; diff --git a/src/utils/exec.ts b/src/utils/exec.ts index a2b14e110..352e40fd9 100644 --- a/src/utils/exec.ts +++ b/src/utils/exec.ts @@ -4,8 +4,7 @@ import util from 'util'; import type { Color } from 'chalk'; import concurrently from 'concurrently'; -import type { ExecaChildProcess } from 'execa'; -import execa from 'execa'; +import execa, type { ExecaChildProcess } from 'execa'; import npmRunPath from 'npm-run-path'; import npmWhich from 'npm-which'; diff --git a/src/utils/manifest.ts b/src/utils/manifest.ts index 475800eb7..04a22b18f 100644 --- a/src/utils/manifest.ts +++ b/src/utils/manifest.ts @@ -1,7 +1,6 @@ /* eslint-disable new-cap */ -import type { NormalizedPackageJson } from 'read-pkg-up'; -import readPkgUp from 'read-pkg-up'; +import readPkgUp, type { NormalizedPackageJson } from 'read-pkg-up'; import * as t from 'runtypes'; import { hasProp } from './validation';