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

New-rule: force re-export style

Open
#3,158 10 comments 0 reactions 0 assignees View on GitHub
rule proposal
Dominant language
JavaScript
Stars
5.9k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

Here is a proposal for a new rule: forbidding imports followed by equivalent exports, and prefer re-export syntax instead.

Example:

```typescript
// Forbidden
import { obj } from 'module'
export { obj }

// Allowed
export { obj } from 'module'
```

I didn't find any similar rule in the docs, and I think it would be nice to have one to enforce consistent styling of re-exports.

Contributor guide

Open the contributing guide

Research direction

No implementation file or test path is named. Start by reviewing existing import/export rule implementations and the documentation structure, then trace how rules are tested; done means the new rule consistently rejects equivalent import-and-export pairs, permits direct re-exports, and has corresponding tests and docs.

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.