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

New: ES Module Compatibility #43

Merged
merged 9 commits into from
Dec 2, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revision 3
- fix more nits
- correct the name/link to the related issue
evanplaice committed Oct 16, 2019
commit 028bbd83846c2c4e29d775fbefdd562c36a35684
8 changes: 4 additions & 4 deletions designs/2019-esm-compatibilty/README.md
Original file line number Diff line number Diff line change
@@ -56,9 +56,9 @@ The user defines `.eslintrc.js` outlining the rule set they prefer to use within

### The Issue

The user package is ESM-based, all `.js` files within are read as ESM.
When the user package is ESM-based, all `.js` files within are read as ESM.

ESLint is CJS-based, it loads all files within it's package boundary as CJS.
However, ESLint is CJS-based so, it loads all files within it's package boundary as CJS.

The configuration file is defined as a CJS module (i.e., `module.exports`), but has a `.js` extension syntax so requiring it throws an error. ESLint, by design reaches across the package boundary to load the user-defined configuration but the user has inadvertently signaled to Node to load it with the wrong module loader.

@@ -87,7 +87,7 @@ A quick mention in the [FAQ](https://github.com/eslint/eslint#frequently-asked-q

None. The change has no negative functionality or performance impacts.

## People
### People

Some developers within the Node ecosystem are strongly opposed to supporting `"type": "module"` at all.

@@ -169,6 +169,6 @@ The scope of this RFC is limited to only ES module compatibility concerns. If th

## Related Discussions

- [Issue #12321](https://github.com/eslint/eslint/pull/12321)
- [Issue #12319](https://github.com/eslint/eslint/issues/12319)
- [PR #12321](https://github.com/eslint/eslint/pull/12321)
- [Transition Path Problems for Tooling - node/modules](https://github.com/nodejs/modules/issues/388)