import-js/eslint-plugin-import

[import/order] control over fix newlines

Open

#2,391 创建于 2022年3月1日

在 GitHub 查看
 (2 评论) (3 反应) (0 负责人)JavaScript (4,946 star) (1,540 fork)batch import
enhancementhelp wantedimport/export ordering

描述

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:

贡献者指南