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

(group-exports) Option to never put the export next to the declaration

Open
#1,871 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
JavaScript
Stars
5.9k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

I'd like to see an option for always having named exports be specified separately to their definition. e.g.

Fail

export const foo = 'bar';

Pass

const foo = 'bar';

export { foo };

I'm basically trying to mitigate the workflow of moving the export keyword to the bottom of the file if another named export is added.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the group-exports rule and its existing tests, then compare the reported inline and separate export examples with the rule's current behavior. Define the option's expected handling for named exports and update coverage so the requested separate-export form passes while the inline form fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.