Add mention of import type to import section

This commit is contained in:
Samuel Šulovský 2022-06-30 21:23:33 +02:00
parent dcdccaaecc
commit 3c0634c0ea

View file

@ -2683,6 +2683,7 @@ With clean and easy to read import statements you can quickly see the dependenci
- Unused imports should be removed.
- Named imports must be alphabetized (i.e. `import {A, B, C} from 'foo';`)
- Import sources must be alphabetized within groups, i.e.: `import * as foo from 'a'; import * as bar from 'b';`
- Prefer using `import type` instead of `import` when importing only types from a file to avoid dependency cycles, as these imports are erased at runtime
- Groups of imports are delineated by blank lines.
- Groups must respect following order:
- Polyfills (i.e. `import 'reflect-metadata';`)
@ -2697,6 +2698,7 @@ With clean and easy to read import statements you can quickly see the dependenci
```ts
import { TypeDefinition } from '../types/typeDefinition';
import { AttributeTypes } from '../model/attribute';
import { Customer, Credentials } from '../model/types';
import { ApiCredentials, Adapters } from './common/api/authorization';
import fs from 'fs';
import { ConfigPlugin } from './plugins/config/configPlugin';
@ -2714,6 +2716,7 @@ import { BindingScopeEnum, Container } from 'inversify';
import { AttributeTypes } from '../model/attribute';
import { TypeDefinition } from '../types/typeDefinition';
import type { Customer, Credentials } from '../model/types';
import { ApiCredentials, Adapters } from './common/api/authorization';
import { ConfigPlugin } from './plugins/config/configPlugin';