Skip to content

[import/order] Regression in type behavior with parent and sibling #2683

Open
@erunion

Description

@erunion

We have a complex import/order config and are seeing some new behavior with our type imports on v2.27.5 where previously sorted parent → sibling type imports want to now be sorted as sibling → parent.

'import/order': [
  'error',
  {
    'alphabetize': {
      order: 'asc',
      caseInsensitive: true,
    },
    'groups': ['type', 'builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
    'newlines-between': 'always',
    'warnOnUnassignedImports': true,
  },
],

Before

import type { CommandOptions } from '../lib/baseCommand';
import type { Options } from './openapi/validate';

import Command from '../lib/baseCommand';
import isHidden from '../lib/decorators/isHidden';

import OpenAPIValidateCommand from './openapi/validate';

After

import type { Options } from './openapi/validate';
import type { CommandOptions } from '../lib/baseCommand'; <-- this line was moved 

import Command from '../lib/baseCommand';
import isHidden from '../lib/decorators/isHidden';

import OpenAPIValidateCommand from './openapi/validate';

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions