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

chore!: use pure ES modules #435

Merged
merged 2 commits into from
Feb 2, 2022
Merged

chore!: use pure ES modules #435

merged 2 commits into from
Feb 2, 2022

Conversation

ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Jan 24, 2022

Part of https://github.com/netlify/team-dev/issues/36

This migrates this repository to pure ES modules.

Checklist

Please add a x inside each checkbox:

  • I have read the contribution guidelines.
  • The status checks are successful (continuous integration). Those can be seen below.

@ehmicky ehmicky added the type: chore work needed to keep the product and development running smoothly label Jan 24, 2022
@@ -0,0 +1,15 @@
#!/usr/bin/env node
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repository's ESLint configuration is used both for our other repositories and for this repository itself.

We cannot change the ESLint configuration to make it assume that *.js are pure ES modules yet until all our repositories have migrated.

Because of this, we need to use *.mjs files in this repository for the moment. Therefore, this PR renames several *.js to *.mjs.

@@ -105,5 +107,8 @@
},
"engines": {
"node": ">=16.0.0"
},
"ava": {
"verbose": true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like our other repositories, moving the ava configuration to package.json solves some issues with pure ES modules.

@@ -1,28 +1,30 @@
{
"name": "@netlify/eslint-config-node",
"version": "4.1.7",
"main": ".eslintrc.js",
"type": "commonjs",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@JGAntunes JGAntunes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a small comment about possible typo, LGTM 👍

```

- Copy the `.editorconfig` and `.gitattributes` files relativity to the root of the project.
- Copy the `commitlint.config.cjs`, `.editorconfig` and `.gitattributes` files relativity to the root of the project.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saw it was copy paste but should s/relativity/relative/? 🤔

Suggested change
- Copy the `commitlint.config.cjs`, `.editorconfig` and `.gitattributes` files relativity to the root of the project.
- Copy the `commitlint.config.cjs`, `.editorconfig` and `.gitattributes` files relative to the root of the project.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it's been automerged :-/

Good catch, I have opened a PR at #438 to fix it.

@kodiakhq kodiakhq bot merged commit 81221e1 into main Feb 2, 2022
@kodiakhq kodiakhq bot deleted the chore/pure-esm branch February 2, 2022 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants