prettier-plugin-sort-imports icon indicating copy to clipboard operation
prettier-plugin-sort-imports copied to clipboard

Add the ability to order types

Open samchouse opened this issue 2 years ago • 0 comments

implemented by #153

Is your feature request related to a problem? I want my import type imports to be ordered at the bottom and not grouped in with my 3rd party module imports.

Describe the solution you'd like Something like <THIRD_PARTY_MODULES> but named <TYPE_IMPORTS> that we can add to importOrder.

{
  "importOrder": ["<TYPE_IMPORTS>", "^[./]"],
  "importOrderSeparation": true,
  "importOrderSortSpecifiers": true
}

Before:

import { getMDXComponent } from 'mdx-bundler/client';
import type { GetStaticPaths, GetStaticProps, NextPage } from 'next';
import Head from 'next/head';
import { useMemo } from 'react';

After:

import { getMDXComponent } from 'mdx-bundler/client';
import Head from 'next/head';
import { useMemo } from 'react';

import type { GetStaticPaths, GetStaticProps, NextPage } from 'next';

Describe alternatives you've considered None

Additional context None

samchouse avatar May 02 '22 11:05 samchouse