import-js/eslint-plugin-import

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

Open

#1,723 opened on Apr 7, 2020

View on GitHub
 (3 comments) (2 reactions) (0 assignees)JavaScript (1,540 forks)batch import
bughelp wantedimport/export ordering

Repository metrics

Stars
 (4,946 stars)
PR merge metrics
 (Avg merge 138d 22h) (3 merged PRs in 30d)

Description

Related: https://github.com/benmosher/eslint-plugin-import/issues/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 };

Contributor guide