Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[import/order] Inline comments are not moved by the auto-fixer along with the rest of the line #1723

Open
astorije opened this issue Apr 7, 2020 · 3 comments

Comments

@astorije
Copy link
Contributor

astorije commented Apr 7, 2020

Related: #1450

Repro

import { Foo } from 'foo';
export { Bar }; // Comment on the export line
import/order:
  - error
  - pathGroupsExcludedImportTypes:
      - builtin
    newlines-between: always
    alphabetize:
      order: asc
      caseInsensitive: true

Expected

import { Foo } from 'foo';

export { Bar }; // Comment on the export line

Actual

import { Foo } from 'foo'; // Comment on the export line

export { Bar };
@ljharb
Copy link
Member

ljharb commented Apr 7, 2020

Comments on lines before and after are tricky (comment attachment is a hard problem) but absolutely same-line comments should follow the line they're on.

@kaspar-p
Copy link

Is there a plan to fix this?

@ljharb
Copy link
Member

ljharb commented May 25, 2023

@kaspar-p nope, no plan. a PR is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants