Eflyax / typescript-imports-sort

MIT License
0 stars 0 forks source link

Bug in sorting #19

Open Eflyax opened 6 months ago

Eflyax commented 6 months ago

Problematic input

1) Importing type" is not sorted by alpha.

import type {EntityManager} from '@mikro-orm/core';
import type {AEvaluable} from './evaluable/AEvaluable';

2) Combined import as value with type

import {postDomain} from '@/utils/domainMethods';
import fp from 'fastify-plugin';
import {EntityName, type IRequest} from '@/types';
import {deleteItem} from '@/utils/itemMethods';'
Eflyax commented 5 months ago

Similar problem:

Input:

import themeOverrides from './themeOverrides.json';
import type {PropType} from 'vue';
import type {INode} from '@/foo/types';
import type {IPanelConfig} from '@/types/types.js';

Output:

import themeOverrides from './themeOverrides.json';
import type {PropType} from 'vue';
import type {INode} from '@/foo/types';
import type {IPanelConfig} from '@/types/types.js';

Expected output:

import themeOverrides from './themeOverrides.json';
import type {INode} from '@/foo/types';
import type {IPanelConfig} from '@/types/types.js';
import type {PropType} from 'vue';
Eflyax commented 1 month ago

Problematic input:

import {appGlobals} from '@asf/engine';
import {computed, defineComponent} from 'vue';
import {Icon} from '@iconify/vue';
import {i18nPlugin} from '@/i18n';
import {useHead} from '@unhead/vue';
import {useRoute} from 'vue-router';
import IconCheck from '@/assets/icons/check.svg?component';
import type {Ref} from 'vue';

Import IconCheck is removed