Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@ project.npmignore?.exclude('/scripts/', '.projenrc.ts');
// cdklabs-projen-project-types is overzealous about adding this dependency
project.deps.removeDependency('constructs');

// modern type imports/exports
project.eslint?.addRules({
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
});

project.synth();
5 changes: 3 additions & 2 deletions src/construct.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Dependable, IDependable } from './dependency';
import { MetadataEntry } from './metadata';
import type { IDependable } from './dependency';
import { Dependable } from './dependency';
import type { MetadataEntry } from './metadata';
import { captureStackTrace } from './private/stack-trace';
import { addressOf } from './private/uniqueid';

Expand Down
2 changes: 1 addition & 1 deletion src/dependency.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IConstruct } from './construct';
import type { IConstruct } from './construct';

/**
* Trait marker for classes that can be depended upon
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './construct';
export * from './metadata';
export type * from './metadata';
export * from './dependency';
3 changes: 2 additions & 1 deletion test/construct.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { App as Root } from './util';
import { Construct, ConstructOrder, DependencyGroup, Dependable, IConstruct } from '../src';
import type { IConstruct } from '../src';
import { Construct, ConstructOrder, DependencyGroup, Dependable } from '../src';

// tslint:disable:variable-name
// tslint:disable:max-line-length
Expand Down
Loading