Skip to content

Commit f4a495c

Browse files
committed
refactor(ts): import as type for all modules
better ts processing
1 parent 2de0b0d commit f4a495c

14 files changed

+36
-36
lines changed

src/actions/AddDependenciesAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Packager } from "../packagers/Packager";
1+
import type { Packager } from "../packagers/Packager";
22
import { Action } from "./Action";
33

44
export class AddDependenciesAction extends Action {

src/actions/CreateConfigsFileAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Formatter } from "../formatters/Formatter";
1+
import type { Formatter } from "../formatters/Formatter";
22
import { withCurrentDir, writeContentToFile } from "../process";
33
import { Action } from "./Action";
44

src/actions/CreateYarn2ConfigsAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getChangesetBaseRefs, nonZeroInstalls, zeroInstalls } from "../configs";
22
import { removeFile, runCommand, withCurrentDir, writeContentToFile } from "../process";
3-
import { InquirerConfigs } from "../types";
3+
import type { InquirerConfigs } from "../types";
44
import { Action } from "./Action";
55

66
export class CreateYarn2ConfigsAction extends Action {

src/formatters/FormatterFactory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ConfigsFileFormat } from "../types";
1+
import type { ConfigsFileFormat } from "../types";
22
import { Formatter } from "./Formatter";
33
import { JsFormatter } from "./JsFormatter";
44
import { JsonFormatter } from "./JsonFormatter";

src/generators/ESLintGenerator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { Action } from "../actions/Action";
1+
import type { Action } from "../actions/Action";
22
import { AddDependenciesAction } from "../actions/AddDependenciesAction";
33
import { AddScriptsAction } from "../actions/AddScriptsAction";
44
import { CreateConfigsFileAction } from "../actions/CreateConfigsFileAction";
55
import { CreateFileAction } from "../actions/CreateFileAction";
66
import { eslintBaseConfigs, ignoreFiles } from "../configs";
7-
import { Formatter } from "../formatters/Formatter";
8-
import { Packager } from "../packagers/Packager";
9-
import { InquirerConfigs } from "../types";
7+
import type { Formatter } from "../formatters/Formatter";
8+
import type { Packager } from "../packagers/Packager";
9+
import type { InquirerConfigs } from "../types";
1010
import { Generator } from "./Generator";
1111

1212
export class ESLintGenerator extends Generator {

src/generators/FlowGenerator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { Action } from "../actions/Action";
1+
import type { Action } from "../actions/Action";
22
import { AddDependenciesAction } from "../actions/AddDependenciesAction";
33
import { AddScriptsAction } from "../actions/AddScriptsAction";
44
import { CreateConfigsFileAction } from "../actions/CreateConfigsFileAction";
55
import { CreateFlowConfigsAction } from "../actions/CreateFlowConfigsAction";
66
import { flowConfigs } from "../configs";
7-
import { Formatter } from "../formatters/Formatter";
7+
import type { Formatter } from "../formatters/Formatter";
88
import { IniFormatter } from "../formatters/IniFormatter";
9-
import { Packager } from "../packagers/Packager";
10-
import { InquirerConfigs } from "../types";
9+
import type { Packager } from "../packagers/Packager";
10+
import type { InquirerConfigs } from "../types";
1111
import { Generator } from "./Generator";
1212

1313
export class FlowGenerator extends Generator {

src/generators/Generator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Action } from "../actions/Action";
2-
import { Formatter } from "../formatters/Formatter";
3-
import { Packager } from "../packagers/Packager";
4-
import { InquirerConfigs } from "../types";
1+
import type { Action } from "../actions/Action";
2+
import type { Formatter } from "../formatters/Formatter";
3+
import type { Packager } from "../packagers/Packager";
4+
import type { InquirerConfigs } from "../types";
55

66
export abstract class Generator {
77
actions: Action[];

src/generators/GeneratorFactory.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Formatter } from "../formatters/Formatter";
2-
import { Packager } from "../packagers/Packager";
3-
import { GeneratorType, InquirerConfigs } from "../types";
1+
import type { Formatter } from "../formatters/Formatter";
2+
import type { Packager } from "../packagers/Packager";
3+
import type { GeneratorType, InquirerConfigs } from "../types";
44
import { ESLintGenerator } from "./ESLintGenerator";
55
import { FlowGenerator } from "./FlowGenerator";
6-
import { Generator } from "./Generator";
6+
import type { Generator } from "./Generator";
77
import { PostGenerator } from "./PostGenerator";
88
import { PrettierGenerator } from "./PrettierGenerator";
99
import { Yarn2Generator } from "./Yarn2Generator";

src/generators/PostGenerator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Action } from "../actions/Action";
1+
import type { Action } from "../actions/Action";
22
import { CreateFileAction } from "../actions/CreateFileAction";
33
import { postIgnoreFiles } from "../configs";
4-
import { Formatter } from "../formatters/Formatter";
5-
import { Packager } from "../packagers/Packager";
6-
import { InquirerConfigs } from "../types";
4+
import type { Formatter } from "../formatters/Formatter";
5+
import type { Packager } from "../packagers/Packager";
6+
import type { InquirerConfigs } from "../types";
77
import { Generator } from "./Generator";
88

99
export class PostGenerator extends Generator {

src/generators/PrettierGenerator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { Action } from "../actions/Action";
1+
import type { Action } from "../actions/Action";
22
import { AddDependenciesAction } from "../actions/AddDependenciesAction";
33
import { AddScriptsAction } from "../actions/AddScriptsAction";
44
import { CreateConfigsFileAction } from "../actions/CreateConfigsFileAction";
55
import { CreateFileAction } from "../actions/CreateFileAction";
66
import { ignoreFiles, prettierConfigs, prettierGitAttributeConfigs } from "../configs";
7-
import { Formatter } from "../formatters/Formatter";
8-
import { Packager } from "../packagers/Packager";
9-
import { InquirerConfigs } from "../types";
7+
import type { Formatter } from "../formatters/Formatter";
8+
import type { Packager } from "../packagers/Packager";
9+
import type { InquirerConfigs } from "../types";
1010
import { Generator } from "./Generator";
1111

1212
export class PrettierGenerator extends Generator {

0 commit comments

Comments
 (0)