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

`group-exports`: option for export at definition

Open
#2,406 4 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The option enforces exports statements to happen at definition:

Pass:

export default function foo() {}
export function foo(){}
export const foo = 1;

Fail:

function foo() {}
export {
  foo,
}

The default option for group-exports will be called always, and the added option will be never.

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 reviewing how its current always behavior is implemented. Check the rule's existing tests, then verify that the new never option accepts exports at definition while rejecting separate export statements, without changing the default behavior.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.