Skip to content

Importing from parent behaving unexpectedly #14

Open
@alexlafroscia

Description

@alexlafroscia

I have import-helpers/sort-order configured like so:

    {
        groups: [
          'absolute',
          'module',
          '/^\\$src/',
          'parent',
          'sibling',
          'index'
        ],
        newlinesBetween: 'always',
        alphabetize: { order: 'asc' }
      }

I am seeing that either of these are considered "allowable" by the plugin

import { useCapabilities } from '..';

import { Capabilities, PREFIX } from '../useCapabilities';
import { Capabilities, PREFIX } from '../useCapabilities';

import { useCapabilities } from '..';

But this is not, because there must be a newline between groups

import { Capabilities, PREFIX } from '../useCapabilities';
import { useCapabilities } from '..';

This doesn't seem right to me, since it seems like they are in separate groups, but the groups can be ordered either way. Any idea what might be going on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions