import-js / import-js/eslint-plugin-import

import/order odd error

Open
#1,853 2 comments 1 reaction 0 assignees View on GitHub
bug help wanted
Dominant language
JavaScript
Stars
5.9k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

```js
'use strict';

const path = require('path');
const fs = require('fs');
const {
Value,

CreateDataProperty,
DetachArrayBuffer,
OrdinaryObjectCreate,
ToString,
Type,

Throw,
AbruptCompletion,

ManagedRealm,

inspect,
} = require('..');
```

```
file.js
4:12 error There should be no empty line between import groups import/order
```

In particular it is warning here:
```
1 | 'use strict';
2 |
3 | const path = require('path');
4 | const fs = require('fs');
^^^^^^^^^^^^^
5 | const {
6 | Value,
7 |
8 | CreateDataProperty,
...
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the report with the shown file.js snippet and the import/order rule. Start by tracing how the rule groups the require declarations, especially the destructured require after fs. Done means the snippet no longer produces the reported error, with the intended import/order behavior covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.