import-js / import-js/eslint-plugin-import
Request: shall there be have a separate rule for `newlines-between` of `order`?
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
I don't know if it is a common situation, but I would very much like a separate rule that enforces [newlines between imports](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md#newlines-between) (or avoids them).
For example, I need to set up the rule like this:
```ts
"import/order": [
"error",
{
// disable all default grouping behaviour
groups: [],
// disable alphabetising
alphabetize: {
order: "ignore",
caseInsensitive: false,
},
"newlines-between": "never",
},
],
```
just because I prefer to handle the sorting elsewhere or by other rules/plugins/file-specific.
Contributor guide
Research direction
Start by reading the import/order documentation, especially the existing newlines-between option and the configuration shown in the issue. Determine how newline enforcement can be separated from grouping and sorting, then document and test the resulting behavior so both enforcing and avoiding newlines work independently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100