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

Refactor everything to ES Modules #1929

Merged
merged 14 commits into from
May 22, 2021
Merged

Refactor everything to ES Modules #1929

merged 14 commits into from
May 22, 2021

Conversation

FloEdelmann
Copy link
Member

@FloEdelmann FloEdelmann commented May 14, 2021

These are the changes from #1626 again, which has been reverted in #1926.

Since #1930 is now merged, we shouldn't have to wait for Unitech/pm2#4540 to be fixed.


ECMAScript Modules (ESM) support first appeared without a command-line flag in Node.js v14: https://nodejs.org/docs/latest-v14.x/api/esm.html

In Node, import does not work with .json files (without another command-line flag), that's why in #1623 I replaced them and in #1625 implemented a workaround.

To do after this is merged

  • Drop esm dependency from package.json
  • Enable import/no-duplicates rule
  • Enable import/order rule
  • Enable import/newline-after-import rule
  • Enable import/first rule
  • Enable import/exports-last rule
  • Replace unicorn/import-style configuration with no-restricted-imports
  • Remove explicit disabling of unicorn/prefer-node-protocol rule once Support node: protocol unjs/jiti#30 is fixed

@FloEdelmann FloEdelmann added the refactoring Improves code quality. label May 14, 2021
@FloEdelmann FloEdelmann temporarily deployed to open-fixture-library-pr-1929 May 14, 2021 08:16 Inactive
@github-actions

This comment has been minimized.

@FloEdelmann FloEdelmann marked this pull request as ready for review May 22, 2021 09:42
@github-actions

This comment has been minimized.

@FloEdelmann FloEdelmann merged commit 579528b into master May 22, 2021
@FloEdelmann FloEdelmann deleted the esm-2 branch May 22, 2021 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Improves code quality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant