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

feat: add ESM-specific rules #441

Merged
merged 1 commit into from
Feb 2, 2022
Merged

feat: add ESM-specific rules #441

merged 1 commit into from
Feb 2, 2022

Conversation

ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Feb 2, 2022

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

Most of our repositories have migrated to pure ES modules. However, a few are still using CommonJS.
To accommodate with both and transition incrementally, this PR adds a new .eslintrc that contains rules specific to repositories which have migrated to pure ES modules.

Those will need to opt-in to it by switching from require('@netlify/eslint-config-node') to require('@netlify/eslint-config-node/esm'). After switching, they will also be able to clean up a few rules in their .eslintrc.

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: feature code contributing to the implementation of a feature and/or user facing functionality label Feb 2, 2022
@ehmicky ehmicky self-assigned this Feb 2, 2022
@@ -4,11 +4,13 @@
"type": "commonjs",
"exports": {
".": "./.eslintrc.cjs",
"./esm": "./.eslintrc_esm.cjs",

Choose a reason for hiding this comment

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

neat!

@ehmicky ehmicky merged commit 239d4ec into main Feb 2, 2022
@ehmicky ehmicky deleted the chore/esm-config branch February 2, 2022 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants