import-js/eslint-plugin-import

[import/order] control over fix newlines

Open

#2.391 geöffnet am 1. März 2022

Auf GitHub ansehen
 (2 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)JavaScript (1.540 Forks)batch import
enhancementhelp wantedimport/export ordering

Repository-Metriken

Stars
 (4.946 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 138T 22h) (3 gemergte PRs in 30 T)

Beschreibung

With import/order, when using 'newlines-between': 'always-and-inside-groups' there seems to be no way to control how the fix happens.

Example problem:

import AddressTextField from './AddressTextField'
import CityField from './CityField'

import ContentLoader from 'components/ContentLoader/ContentLoader'
import SeparatedList from 'components/SeparatedList/SeparatedList'

Fix result:

import ContentLoader from 'components/ContentLoader/ContentLoader'

import SeparatedList from 'components/SeparatedList/SeparatedList'

import AddressTextField from './AddressTextField'
import CityField from './CityField'

Desired result:

import ContentLoader from 'components/ContentLoader/ContentLoader'
import SeparatedList from 'components/SeparatedList/SeparatedList'

import AddressTextField from './AddressTextField'
import CityField from './CityField'

Any chance to add support for some control over this?

Possible ways to control:

Contributor Guide