Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc] Use re-export statements instead of import -> export #683

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ClementEXWiki
Copy link
Contributor

Jira URL

N/A

Changes

Description

  • Replace import followed by export with re-export statements

Clarifications

  • Instead of importing a module and then exporting it directly, it's preferred to use a re-export statement:
// Instead of:
import { obj } from './module'
export { obj }

// Write this:
export { obj } from './module'

Screenshots & Video

N/A

Executed Tests

N/A

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • N/A

@ClementEXWiki
Copy link
Contributor Author

cc @manuelleduc

@manuelleduc
Copy link
Contributor

Thanks for working on this.
I understand it makes thinks more compact, but this is not our current coding style.
What I suggest is to:

  1. write a proposal on https://forum.xwiki.org/c/cristal/18 to propose a new best practice
  2. ideally find a configuration for eslint to enforce this coding style, avoiding future inconsistencies

@manuelleduc manuelleduc self-assigned this Feb 19, 2025
@ClementEXWiki
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants