TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Organize imports does not respect export grouping

Open mjbvz opened this issue 3 years ago • 0 comments

Bug Report

🔎 Search Terms

  • Organize imports
  • code action
  • source action

🕗 Version & Regression Information

4.8.0-dev.20220809

Repo

  1. For the code:
import { c } from './c';

import { a } from './a';

import { b } from './b';

console.log(a, b, c)

export { c } from './c';

export { a } from './a';

export { b } from './b';
  1. Run 'Organize imports'

Expected

Nothing should happen since all imports/exports are on their own lines

Actual

The imports are correctly left untouched by the exports are grouped and re-ordered

import { c } from './c';

import { a } from './a';

import { b } from './b';

console.log(a, b, c)

export { a } from './a';
export { b } from './b';
export { c } from './c';

mjbvz avatar Aug 09 '22 23:08 mjbvz