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

Customized scoped package ranking?

Open
#949 3 comments 1 reaction 0 assignees View on GitHub
import/export ordering
Dominant language
JavaScript
Stars
5.9k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

Is there a way to differentiate scoped packages from other 'external' packages? For example, I'd like to enforce scoped imports this way:

```js
// This is ok
import React from 'react'
import @org/package

...
// This should fail
import @org/package
import React from 'react'
```

Our company has internal scoped packages and we'd like to enforce the ordering of their imports as well. I'm happy to do the work if this functionality doesn't currently exist. I just wanted to make sure I can't already do this and you're open to adding a feature like this.

Contributor guide

Open the contributing guide

Research direction

Review the plugin's existing import-ordering behavior and documentation first, then determine whether scoped packages can already be separated from other external imports. Define the configuration and ordering behavior needed for internal scopes, and add coverage showing both accepted and rejected import orders.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.