Add support for a `type` group
Add support for classifying type imports as an entirely separate group, if desired.
From the docs:
The type
group
TypeScript has what are called type imports, e.g.,
import type { ImportantType } from './thing';
If you would like to treat these type imports as a completely separate group (instead of sorted according to the file it was imported from), add a type
group to your groups
list.
With the type
group:
/* eslint import-helpers/order-imports: ["error", {"groups": ['sibling', 'module', 'type']}] */
import foo from './foo';
import fs from 'fs';
import path from 'path';
import type { ImportantType } from './sibling';
Without the type
group:
/* eslint import-helpers/order-imports: ["error", {"groups": ['sibling', 'module']}] */
import foo from './foo';
import type { ImportantType } from './sibling';
import fs from 'fs';
import path from 'path';