Skip to content

Commit 008590b

Browse files
mrgraingithub-actions
andauthored
chore: enforce consistent-type-imports everywhere (#229)
We were already enforcing this rule in `toolkit-lib`. Let's enforce it everywhere. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license --------- Signed-off-by: github-actions <[email protected]> Co-authored-by: github-actions <[email protected]>
1 parent f1ef615 commit 008590b

File tree

163 files changed

+579
-451
lines changed

Some content is hidden

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

163 files changed

+579
-451
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,6 @@ tmpToolkitHelpers.package.addField('exports', {
729729

730730
tmpToolkitHelpers.eslint?.addRules({
731731
'@cdklabs/no-throw-default-error': 'error',
732-
'@typescript-eslint/consistent-type-imports': 'error',
733732
});
734733

735734
tmpToolkitHelpers.gitignore.addPatterns('test/**/*.map');
@@ -1218,7 +1217,6 @@ new S3DocsPublishing(toolkitLib, {
12181217
// Eslint rules
12191218
toolkitLib.eslint?.addRules({
12201219
'@cdklabs/no-throw-default-error': 'error',
1221-
'@typescript-eslint/consistent-type-imports': 'error',
12221220
'import/no-restricted-paths': ['error', {
12231221
zones: [{
12241222
target: './',

packages/@aws-cdk/cdk-build-tools/.eslintrc.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cdk-build-tools/lib/compile.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { makeExecutable, shell } from './os';
2-
import { CDKBuildOptions, CompilerOverrides, currentPackageJson, packageCompiler } from './package-info';
3-
import { Timers } from './timer';
2+
import type { CDKBuildOptions, CompilerOverrides } from './package-info';
3+
import { currentPackageJson, packageCompiler } from './package-info';
4+
import type { Timers } from './timer';
45

56
/**
67
* Run the compiler on the current package

packages/@aws-cdk/cdk-build-tools/lib/lint.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import * as path from 'path';
22
import * as process from 'process';
33
import * as fs from 'fs-extra';
44
import { shell, escape } from './os';
5-
import { CDKBuildOptions, CompilerOverrides } from './package-info';
6-
import { Timers } from './timer';
5+
import type { CDKBuildOptions, CompilerOverrides } from './package-info';
6+
import type { Timers } from './timer';
77

88
export async function lintCurrentPackage(
99
options: CDKBuildOptions,

packages/@aws-cdk/cdk-cli-wrapper/.eslintrc.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cdk-cli-wrapper/lib/cdk-wrapper.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { ChildProcess } from 'child_process';
2-
import { DefaultCdkOptions, DeployOptions, DestroyOptions, SynthOptions, ListOptions, StackActivityProgress, HotswapMode } from './commands';
1+
import type { ChildProcess } from 'child_process';
2+
import type { DefaultCdkOptions, DeployOptions, DestroyOptions, SynthOptions, ListOptions } from './commands';
3+
import { StackActivityProgress, HotswapMode } from './commands';
34
import { exec, watch } from './utils';
45

56
/**

packages/@aws-cdk/cdk-cli-wrapper/lib/commands/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DefaultCdkOptions, RequireApproval } from './common';
1+
import type { DefaultCdkOptions, RequireApproval } from './common';
22

33
/**
44
* Options to use with cdk deploy

packages/@aws-cdk/cdk-cli-wrapper/lib/commands/destroy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DefaultCdkOptions } from './common';
1+
import type { DefaultCdkOptions } from './common';
22

33
/**
44
* Options to use with cdk destroy

packages/@aws-cdk/cdk-cli-wrapper/lib/commands/list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DefaultCdkOptions } from './common';
1+
import type { DefaultCdkOptions } from './common';
22

33
/**
44
* Options for cdk list

0 commit comments

Comments
 (0)