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

[FIX] Docs: enforce file extensions for ES6 import specifiers. #8778

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

Conversation

thibsy
Copy link
Contributor

@thibsy thibsy commented Dec 31, 2024

Hi folks,

Technically, it is not possible to create JavaScript bundles using Rollup.js right now, because our code-style disallows file extensions in ES6 import specifiers, but the module bundler requires them. This is due to the Node.js specification of import specifiers, which states that a file extension is always necessary for relative specifiers. Since we are maintaining a repository and cannot use absolute specifiers, we need to make a code-style adjustment.

This PR therefore changes:

  • the ESLint configuration to enforce file extensions in import statements, except for specifiers that are resolved by other tools like Node.js itself or Rollup.js
  • the JavaScript code-style to document why the change is necessary

Kind regards,
@thibsy

* Updates the ESLint configuration to enforce file extensions in import statements
* Updates the JavaScript code-style to document why the change is necessary
@thibsy thibsy added jour fixe documentation Pull requests that only update or add documentation. labels Dec 31, 2024
@thibsy thibsy self-assigned this Dec 31, 2024
@matthiaskunkel
Copy link
Member

Jour Fixe, 06 JAN 2025: Thibeau notified us about this change in the JavaScript handling for 10 and trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Pull requests that only update or add documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants